Tests: added multiple headers concatenation test.
This commit is contained in:
@@ -20,14 +20,18 @@ class TestPythonApplication(TestApplicationPython):
|
|||||||
|
|
||||||
body = 'Test body string.'
|
body = 'Test body string.'
|
||||||
|
|
||||||
resp = self.post(
|
resp = self.http(
|
||||||
headers={
|
b"""POST / HTTP/1.1
|
||||||
'Host': 'localhost',
|
Host: localhost
|
||||||
'Content-Type': 'text/html',
|
Content-Length: %d
|
||||||
'Custom-Header': 'blah',
|
Custom-Header: blah
|
||||||
'Connection': 'close',
|
Custom-hEader: Blah
|
||||||
},
|
Content-Type: text/html
|
||||||
body=body,
|
Connection: close
|
||||||
|
custom-header: BLAH
|
||||||
|
|
||||||
|
%s""" % (len(body), body.encode()),
|
||||||
|
raw=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
assert resp['status'] == 200, 'status'
|
assert resp['status'] == 200, 'status'
|
||||||
@@ -52,7 +56,7 @@ class TestPythonApplication(TestApplicationPython):
|
|||||||
'Request-Uri': '/',
|
'Request-Uri': '/',
|
||||||
'Http-Host': 'localhost',
|
'Http-Host': 'localhost',
|
||||||
'Server-Protocol': 'HTTP/1.1',
|
'Server-Protocol': 'HTTP/1.1',
|
||||||
'Custom-Header': 'blah',
|
'Custom-Header': 'blah, Blah, BLAH',
|
||||||
'Wsgi-Version': '(1, 0)',
|
'Wsgi-Version': '(1, 0)',
|
||||||
'Wsgi-Url-Scheme': 'http',
|
'Wsgi-Url-Scheme': 'http',
|
||||||
'Wsgi-Multithread': 'False',
|
'Wsgi-Multithread': 'False',
|
||||||
|
|||||||
Reference in New Issue
Block a user