summaryrefslogtreecommitdiffhomepage
path: root/test/test_http_header.py
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2022-06-02 16:51:49 +0400
committerKonstantin Pavlov <thresh@nginx.com>2022-06-02 16:51:49 +0400
commitd9fddee1dbfc1f5d49c8f40386289d7188030952 (patch)
tree842a62b343ac33eba10e7a426a10b55bb1c46aed /test/test_http_header.py
parent420395ee2e7cd464e157c49bea3d74f15bf25f30 (diff)
parent0d48fe73c4450901622373e35f6ff3a944ec13d6 (diff)
downloadunit-d9fddee1dbfc1f5d49c8f40386289d7188030952.tar.gz
unit-d9fddee1dbfc1f5d49c8f40386289d7188030952.tar.bz2
Merged with the default branch.1.27.0-1
Diffstat (limited to 'test/test_http_header.py')
-rw-r--r--test/test_http_header.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/test/test_http_header.py b/test/test_http_header.py
index ca355eb7..6773c44f 100644
--- a/test/test_http_header.py
+++ b/test/test_http_header.py
@@ -213,7 +213,7 @@ Connection: close
self.post(
headers={
'Host': 'localhost',
- 'Content-Length': str(2 ** 64),
+ 'Content-Length': str(2**64),
'Connection': 'close',
},
body='X' * 1000,
@@ -325,9 +325,7 @@ Connection: close
def test_http_header_host_port_empty(self):
self.load('host')
- resp = self.get(
- headers={'Host': 'exmaple.com:', 'Connection': 'close'}
- )
+ resp = self.get(headers={'Host': 'exmaple.com:', 'Connection': 'close'})
assert resp['status'] == 200, 'Host port empty status'
assert (
@@ -376,9 +374,7 @@ Connection: close
def test_http_header_host_trailing_period_2(self):
self.load('host')
- resp = self.get(
- headers={'Host': 'EXAMPLE.COM.', 'Connection': 'close'}
- )
+ resp = self.get(headers={'Host': 'EXAMPLE.COM.', 'Connection': 'close'})
assert resp['status'] == 200, 'Host trailing period 2 status'
assert (
@@ -453,14 +449,16 @@ Connection: close
assert 'CUSTOM' not in resp['headers']['All-Headers']
assert 'success' in self.conf(
- {'http': {'discard_unsafe_fields': False}}, 'settings',
+ {'http': {'discard_unsafe_fields': False}},
+ 'settings',
)
resp = check_status("!#$%&'*+.^`|~Custom_Header")
assert 'CUSTOM' in resp['headers']['All-Headers']
assert 'success' in self.conf(
- {'http': {'discard_unsafe_fields': True}}, 'settings',
+ {'http': {'discard_unsafe_fields': True}},
+ 'settings',
)
resp = check_status("!Custom-Header")