1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Enforce 'RejectHeader' rule in tests

* server/http/http_server.py (_Handler.RejectHeader): enforce
   'RejectHeader' rule.
This commit is contained in:
Ander Juaristi 2016-01-31 17:27:11 +01:00 committed by Tim Rühsen
parent b30500f0f4
commit 4c2dc5010f

View File

@ -369,7 +369,7 @@ class _Handler(BaseHTTPRequestHandler):
rej_headers = header_obj.headers rej_headers = header_obj.headers
for header_line in rej_headers: for header_line in rej_headers:
header_recd = self.headers.get(header_line) 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' % self.send_error(400, 'Blacklisted Header %s received' %
header_line) header_line)
self.finish_headers() self.finish_headers()