From 59fda180d79f6c042a997abf0dc907b6f6dda61a Mon Sep 17 00:00:00 2001 From: Joakim Uddholm Date: Sun, 12 Jun 2016 02:26:16 +0200 Subject: [PATCH] Suggested fix for is_gzipped --- scrapy/utils/gz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapy/utils/gz.py b/scrapy/utils/gz.py index d035f9fdf..f174950a4 100644 --- a/scrapy/utils/gz.py +++ b/scrapy/utils/gz.py @@ -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