summaryrefslogblamecommitdiffhomepage
path: root/test/python/log_body/wsgi.py
blob: 9dcb1b0c773a7998ec94322988b79552081955b7 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                            
def application(environ, start_response):
    content_length = int(environ.get('CONTENT_LENGTH', 0))
    body = bytes(environ['wsgi.input'].read(content_length))

    environ['wsgi.errors'].write(body)
    environ['wsgi.errors'].flush()

    start_response('200', [('Content-Length', '0')])
    return []