test_proxy_chunked.py (1596:b7e2d4d92624) test_proxy_chunked.py (1635:97afbb6c5a15)
1import re
2import select
3import socket
4import time
5
6from unit.applications.lang.python import TestApplicationPython
7
8

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

46 data = recvall(connection).decode()
47
48 m = re.search('\x0d\x0a\x0d\x0a(.*)', data, re.M | re.S)
49 if m is not None:
50 body = m.group(1)
51
52 for line in re.split('\r\n', body):
53 add = ''
1import re
2import select
3import socket
4import time
5
6from unit.applications.lang.python import TestApplicationPython
7
8

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

46 data = recvall(connection).decode()
47
48 m = re.search('\x0d\x0a\x0d\x0a(.*)', data, re.M | re.S)
49 if m is not None:
50 body = m.group(1)
51
52 for line in re.split('\r\n', body):
53 add = ''
54 m1 = re.search('(.*)\sX\s(\d+)', line)
54 m1 = re.search(r'(.*)\sX\s(\d+)', line)
55
56 if m1 is not None:
57 add = m1.group(1) * int(m1.group(2))
58 else:
59 add = line
60
61 req = req + add + '\r\n'
62

--- 176 unchanged lines hidden ---
55
56 if m1 is not None:
57 add = m1.group(1) * int(m1.group(2))
58 else:
59 add = line
60
61 req = req + add + '\r\n'
62

--- 176 unchanged lines hidden ---