summaryrefslogtreecommitdiff
path: root/waitress/tests/fixtureapps/writecb.py
blob: ac59eb96fb3134296c8f7029e89d0cbcf7b408d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def app(environ, start_response): # pragma: no cover
    path_info = environ['PATH_INFO']
    if path_info == '/no_content_length':
        headers = []
    else:
        headers = [('Content-Length', '9')]
    write = start_response('200 OK', headers)
    if path_info == '/long_body':
        write(b'abcdefghij')
    elif path_info == '/short_body':
        write(b'abcdefgh')
    else:
        write(b'abcdefghi')
    return []