Use simpler decompress() to extract gzip.

This commit is contained in:
Arun Prakash Jana 2016-08-29 00:48:48 +05:30
parent 8d925ffd9d
commit 8fdfe7f5c9
No known key found for this signature in database
GPG Key ID: A75979F35C080412

2
buku
View File

@ -1087,7 +1087,7 @@ def get_page_title(resp):
if resp.headers.get('Content-Encoding') == 'gzip':
payload = resp.read()
logger.debug('gzip response')
data = gzip.GzipFile(fileobj=io.BytesIO(payload)).read()
data = gzip.decompress(payload)
else:
data = resp.read()