summaryrefslogtreecommitdiffhomepage
path: root/test/python
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2021-05-24 05:26:15 +0100
committerAndrei Zeliankou <zelenkov@nginx.com>2021-05-24 05:26:15 +0100
commit1154ede862824331d24591c717c270e779a2b08c (patch)
treeb4706a17be3ec2c1ea4151fdee6b4d4caf68009d /test/python
parentc160ea11e4ece4db52731ac8b83dd09ca2d1ef11 (diff)
downloadunit-1154ede862824331d24591c717c270e779a2b08c.tar.gz
unit-1154ede862824331d24591c717c270e779a2b08c.tar.bz2
Tests: test_settings_send_timeout improved.
Data length adjusts depending on socket buffer size when it's possible.
Diffstat (limited to '')
-rw-r--r--test/python/body_generate/wsgi.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/python/body_generate/wsgi.py b/test/python/body_generate/wsgi.py
new file mode 100644
index 00000000..73462be6
--- /dev/null
+++ b/test/python/body_generate/wsgi.py
@@ -0,0 +1,6 @@
+def application(env, start_response):
+ length = env.get('HTTP_X_LENGTH', '10')
+ bytes = b'X' * int(length)
+
+ start_response('200', [('Content-Length', length)])
+ return [bytes]