diff options
Diffstat (limited to 'test/python/log_body')
-rw-r--r-- | test/python/log_body/wsgi.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/python/log_body/wsgi.py b/test/python/log_body/wsgi.py new file mode 100644 index 00000000..9dcb1b0c --- /dev/null +++ b/test/python/log_body/wsgi.py @@ -0,0 +1,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 [] |