mirror of
https://github.com/mirror/wget.git
synced 2024-12-27 13:20:23 +08:00
Enforce 'RejectHeader' rule in tests
* server/http/http_server.py (_Handler.RejectHeader): enforce 'RejectHeader' rule.
This commit is contained in:
parent
b30500f0f4
commit
4c2dc5010f
@ -369,7 +369,7 @@ class _Handler(BaseHTTPRequestHandler):
|
||||
rej_headers = header_obj.headers
|
||||
for header_line in rej_headers:
|
||||
header_recd = self.headers.get(header_line)
|
||||
if not header_recd and header_recd == rej_headers[header_line]:
|
||||
if header_recd and header_recd == rej_headers[header_line]:
|
||||
self.send_error(400, 'Blacklisted Header %s received' %
|
||||
header_line)
|
||||
self.finish_headers()
|
||||
|
Loading…
Reference in New Issue
Block a user