1# -*- coding: utf-8 -
2#
3# This file is part of gunicorn released under the MIT license.
4# See the NOTICE for more information.
5
6import sys
7import time
8
9
10def app(environ, start_response):
11    """Application which pauses 35 seconds before responding. the worker
12    will timeout in default case."""
13    data = b'Hello, World!\n'
14    status = '200 OK'
15    response_headers = [
16        ('Content-type', 'text/plain'),
17        ('Content-Length', str(len(data))),
18    ]
19    sys.stdout.write('request will timeout')
20    sys.stdout.flush()
21    time.sleep(35)
22    start_response(status, response_headers)
23    return iter([data])
24