Tests: added "Connection: close" header for default requests.

This commit is contained in:
Andrey Zelenkov
2018-02-05 15:39:23 +03:00
parent 0379f927b3
commit 91dc1303f5

View File

@@ -151,7 +151,12 @@ class TestUnitHTTP(TestUnit):
port = 7080 if 'port' not in kwargs else kwargs['port']
url = '/' if 'url' not in kwargs else kwargs['url']
http = 'HTTP/1.0' if 'http_10' in kwargs else 'HTTP/1.1'
headers = {'Host': 'localhost'} if 'headers' not in kwargs else kwargs['headers']
headers = ({
'Host': 'localhost',
'Connection': 'close'
} if 'headers' not in kwargs else kwargs['headers'])
body = b'' if 'body' not in kwargs else kwargs['body']
crlf = '\r\n'