crawler: change http header after uncompressing
Change content-encoding to "identity"master
parent
e71fc967ce
commit
026903ce73
|
@ -37,6 +37,7 @@ class GZIPHandler(BaseHandler):
|
||||||
if resp.headers.get('Content-Encoding') == 'gzip':
|
if resp.headers.get('Content-Encoding') == 'gzip':
|
||||||
data = resp.read()
|
data = resp.read()
|
||||||
data = GzipFile(fileobj=BytesIO(data), mode='r').read()
|
data = GzipFile(fileobj=BytesIO(data), mode='r').read()
|
||||||
|
resp.headers['Content-Encoding'] = 'identity'
|
||||||
|
|
||||||
fp = BytesIO(data)
|
fp = BytesIO(data)
|
||||||
old_resp = resp
|
old_resp = resp
|
||||||
|
|
Loading…
Reference in New Issue