diff options
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), |