Tests: headers with equal header fields allowed.

This commit is contained in:
Andrey Zelenkov 2019-02-14 16:09:54 +03:00
parent 7ce9f61cb6
commit 0e5aaf60d4

View file

@ -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