Files
nginx-unit/test/python/threads/wsgi.py
Andrei Zeliankou 39adb292d5 Tests: style.
2021-10-18 01:10:11 +01:00

20 lines
393 B
Python

import threading
import time
def application(environ, start_response):
delay = float(environ.get('HTTP_X_DELAY', 0))
time.sleep(delay)
start_response(
'200',
[
('Content-Length', '0'),
('Wsgi-Multithread', str(environ['wsgi.multithread'])),
('X-Thread', str(threading.currentThread().ident)),
],
)
return []