diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2018-02-26 19:53:40 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2018-02-26 19:53:40 +0300 |
commit | a89747e97c2a00503260d72082949be4ba97983f (patch) | |
tree | 424fea2951f83cde3f73365a0869cff92fad2a39 /test/unit.py | |
parent | 6d79c559b5cebeb2ad7c5dbdb779e3bec26fc08a (diff) | |
download | unit-a89747e97c2a00503260d72082949be4ba97983f.tar.gz unit-a89747e97c2a00503260d72082949be4ba97983f.tar.bz2 |
Tests: more perl tests.
Diffstat (limited to 'test/unit.py')
-rw-r--r-- | test/unit.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/unit.py b/test/unit.py index 48b5497d..8e7ba105 100644 --- a/test/unit.py +++ b/test/unit.py @@ -237,7 +237,13 @@ class TestUnitHTTP(TestUnit): headers = {} for line in headers_lines: m = re.search('(.*)\:\s(.*)', line) - headers[m.group(1)] = m.group(2) + + if m.group(1) not in headers: + headers[m.group(1)] = m.group(2) + elif isinstance(headers[m.group(1)], list): + headers[m.group(1)].append(m.group(2)) + else: + headers[m.group(1)] = [headers[m.group(1)], m.group(2)] return { 'status': int(status), |