summaryrefslogtreecommitdiffhomepage
path: root/test/unit/http.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2022-07-28 14:12:19 +0100
committerAndrei Zeliankou <zelenkov@nginx.com>2022-07-28 14:12:19 +0100
commit69e690affe94eb37308d1eb551b34cd32323aae1 (patch)
tree634020ed3f54c65c0b02318bf8f606673fe75e7e /test/unit/http.py
parent3f8cf62c03a55b9767f0c75b3df6a1a40252b19a (diff)
downloadunit-69e690affe94eb37308d1eb551b34cd32323aae1.tar.gz
unit-69e690affe94eb37308d1eb551b34cd32323aae1.tar.bz2
Tests: added flags to search functions in proto.py.
Also removed unnesessary re.compile() calls.
Diffstat (limited to '')
-rw-r--r--test/unit/http.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/unit/http.py b/test/unit/http.py
index b4a1a17b..522d2ea6 100644
--- a/test/unit/http.py
+++ b/test/unit/http.py
@@ -209,9 +209,7 @@ class TestHTTP:
return {}
headers_text, body = m.group(1), m.group(2)
-
- p = re.compile('(.*?)\x0d\x0a?', re.M | re.S)
- headers_lines = p.findall(headers_text)
+ headers_lines = re.findall('(.*?)\x0d\x0a?', headers_text, re.M | re.S)
status = re.search(
r'^HTTP\/\d\.\d\s(\d+)|$', headers_lines.pop(0)