Suggested fix for is_gzipped

This commit is contained in:
Joakim Uddholm 2016-06-12 02:26:16 +02:00 committed by Paul Tremberth
parent 1c7ea7d686
commit 59fda180d7
1 changed files with 1 additions and 1 deletions

View File

@ -54,4 +54,4 @@ def gunzip(data):
def is_gzipped(response):
"""Return True if the response is gzipped, or False otherwise"""
ctype = response.headers.get('Content-Type', b'')
return ctype in (b'application/x-gzip', b'application/gzip')
return b'application/x-gzip' in ctype or b'application/gzip' in ctype