summaryrefslogtreecommitdiffhomepage
path: root/test/test_proxy.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2020-02-20 21:06:31 +0000
committerAndrei Zeliankou <zelenkov@nginx.com>2020-02-20 21:06:31 +0000
commit1f2445b01b04bf47409fe9aace990c7054a638a6 (patch)
tree83ae1d5be8f66cdab63f184eec45bf93aa1c9441 /test/test_proxy.py
parentfcca366392ff42e1addfac958da70c3e5375fc35 (diff)
downloadunit-1f2445b01b04bf47409fe9aace990c7054a638a6.tar.gz
unit-1f2445b01b04bf47409fe9aace990c7054a638a6.tar.bz2
Tests: added proxy test with large body.
Diffstat (limited to 'test/test_proxy.py')
-rw-r--r--test/test_proxy.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_proxy.py b/test/test_proxy.py
index 5d158285..74bd0873 100644
--- a/test/test_proxy.py
+++ b/test/test_proxy.py
@@ -188,6 +188,13 @@ Content-Length: 10
self.assertEqual(resp['status'], 200, 'status')
self.assertEqual(resp['body'], payload, 'body')
+ self.conf({'http': {'max_body_size': 32 * 1024 * 1024}}, 'settings')
+
+ payload = '0123456789abcdef' * 32 * 64 * 1024
+ resp = self.post_http10(body=payload, read_buffer_size=1024 * 1024)
+ self.assertEqual(resp['status'], 200, 'status')
+ self.assertEqual(resp['body'], payload, 'body')
+
def test_proxy_parallel(self):
payload = 'X' * 4096 * 257
buff_size = 4096 * 258