test_proxy.py (1353:db4dac768708) test_proxy.py (1366:d144edd22316)
1import re
2import time
3import socket
4import unittest
5from unit.applications.lang.python import TestApplicationPython
6
7
8class TestProxy(TestApplicationPython):

--- 174 unchanged lines hidden (view full) ---

183
184 payload = 'X' * 4096 * 257
185 for _ in range(10):
186 resp = self.post_http10(body=payload, read_buffer_size=4096 * 128)
187
188 self.assertEqual(resp['status'], 200, 'status')
189 self.assertEqual(resp['body'], payload, 'body')
190
1import re
2import time
3import socket
4import unittest
5from unit.applications.lang.python import TestApplicationPython
6
7
8class TestProxy(TestApplicationPython):

--- 174 unchanged lines hidden (view full) ---

183
184 payload = 'X' * 4096 * 257
185 for _ in range(10):
186 resp = self.post_http10(body=payload, read_buffer_size=4096 * 128)
187
188 self.assertEqual(resp['status'], 200, 'status')
189 self.assertEqual(resp['body'], payload, 'body')
190
191 self.conf({'http': {'max_body_size': 32 * 1024 * 1024}}, 'settings')
192
193 payload = '0123456789abcdef' * 32 * 64 * 1024
194 resp = self.post_http10(body=payload, read_buffer_size=1024 * 1024)
195 self.assertEqual(resp['status'], 200, 'status')
196 self.assertEqual(resp['body'], payload, 'body')
197
191 def test_proxy_parallel(self):
192 payload = 'X' * 4096 * 257
193 buff_size = 4096 * 258
194
195 socks = []
196 for i in range(10):
197 _, sock = self.post_http10(
198 body=payload + str(i),

--- 425 unchanged lines hidden ---
198 def test_proxy_parallel(self):
199 payload = 'X' * 4096 * 257
200 buff_size = 4096 * 258
201
202 socks = []
203 for i in range(10):
204 _, sock = self.post_http10(
205 body=payload + str(i),

--- 425 unchanged lines hidden ---