xref: /unit/test/python/mirror/wsgi.py (revision 1848)
1552Szelenkov@nginx.comdef application(environ, start_response):
2552Szelenkov@nginx.com
3552Szelenkov@nginx.com    content_length = int(environ.get('CONTENT_LENGTH', 0))
4552Szelenkov@nginx.com    body = bytes(environ['wsgi.input'].read(content_length))
5552Szelenkov@nginx.com
6*1848Szelenkov@nginx.com    start_response('200', [('Content-Length', str(len(body)))])
7552Szelenkov@nginx.com    return [body]
8