From 0e5aaf60d4ca2da509a6a73bebe71139f8aae306 Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Thu, 14 Feb 2019 16:09:54 +0300 Subject: [PATCH] Tests: headers with equal header fields allowed. --- test/unit.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/unit.py b/test/unit.py index c0c65d4a..bd6128cc 100644 --- a/test/unit.py +++ b/test/unit.py @@ -335,7 +335,12 @@ class TestUnitHTTP(TestUnit): headers['Content-Length'] = len(body) for header, value in headers.items(): - req += header + ': ' + str(value) + crlf + if isinstance(value, list): + for v in value: + req += header + ': ' + str(v) + crlf + + else: + req += header + ': ' + str(value) + crlf req = (req + crlf).encode() + body