1import time 2import threading 3 4def application(environ, start_response): 5 delay = float(environ.get('HTTP_X_DELAY', 0)) 6 7 time.sleep(delay) 8 9 start_response('200', [ 10 ('Content-Length', '0'), 11 ('Wsgi-Multithread', str(environ['wsgi.multithread'])), 12 ('X-Thread', str(threading.currentThread().ident)) 13 ]) 14 15 return [] 16