Python doesn't decode Content-Encoding in http.client.
This commit is contained in:
parent
7524ed4f85
commit
985c4cdd41
@ -31,7 +31,7 @@ class ExtensionReplacer(http.server.BaseHTTPRequestHandler):
|
||||
body = response.read()
|
||||
self.send_response(response.status, response.reason)
|
||||
for header, value in response.getheaders():
|
||||
if header.lower() not in ('date', 'connection', 'content-encoding', 'transfer-encoding', 'content-length'):
|
||||
if header.lower() not in ('date', 'connection', 'transfer-encoding', 'content-length'):
|
||||
self.send_header(header, value)
|
||||
self.send_header('Content-Length', len(body))
|
||||
self.end_headers()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user