diff options
| author | Konstantin Pavlov <thresh@nginx.com> | 2022-09-13 13:17:16 +0400 |
|---|---|---|
| committer | Konstantin Pavlov <thresh@nginx.com> | 2022-09-13 13:17:16 +0400 |
| commit | ce964aa30b163e2b3263c5af57c1a6dae7d0cebb (patch) | |
| tree | 26bf70c1a5991f6471fc4caed8628e068fdc0b7b /test/unit/http.py | |
| parent | eba4c3c98fa1bf275d94df8c727f70692ae7eae1 (diff) | |
| parent | 38bd7e76a134084ab95a4ee3125af1ccd7b35864 (diff) | |
| download | unit-1.28.0-1.tar.gz unit-1.28.0-1.tar.bz2 | |
Merged with the default branch.1.28.0-1
Diffstat (limited to 'test/unit/http.py')
| -rw-r--r-- | test/unit/http.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/unit/http.py b/test/unit/http.py index b4a1a17b..b29667c9 100644 --- a/test/unit/http.py +++ b/test/unit/http.py @@ -51,7 +51,7 @@ class TestHTTP: connect_args = addr if sock_type == 'unix' else (addr, port) try: sock.connect(connect_args) - except ConnectionRefusedError: + except (ConnectionRefusedError, FileNotFoundError): sock.close() pytest.fail('Client can\'t connect to the server.') @@ -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) |
