summaryrefslogtreecommitdiffhomepage
path: root/test/python/log_body
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2019-10-23 16:59:53 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2019-10-23 16:59:53 +0300
commit38cfe4cf3d9fd2a4ed0f3949586126a7b8144e8e (patch)
treec3e4e07c3f2f3bf4f8b99deb7994b8953a4a33b5 /test/python/log_body
parent1033cfa3b0255fb23ecd87cc0c4fb4ebb6fedff3 (diff)
downloadunit-38cfe4cf3d9fd2a4ed0f3949586126a7b8144e8e.tar.gz
unit-38cfe4cf3d9fd2a4ed0f3949586126a7b8144e8e.tar.bz2
Tests: added USR1 signal test for unit.log.
Diffstat (limited to '')
-rw-r--r--test/python/log_body/wsgi.py9
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 []