diff options
Diffstat (limited to 'django')
| -rw-r--r-- | django/middleware/gzip.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/django/middleware/gzip.py b/django/middleware/gzip.py index e9e955d704..8548c083e3 100644 --- a/django/middleware/gzip.py +++ b/django/middleware/gzip.py @@ -17,17 +17,11 @@ class GZipMiddleware(object): if not response.streaming and len(response.content) < 200: return response - patch_vary_headers(response, ('Accept-Encoding',)) - # Avoid gzipping if we've already got a content-encoding. if response.has_header('Content-Encoding'): return response - # MSIE have issues with gzipped response of various content types. - if "msie" in request.META.get('HTTP_USER_AGENT', '').lower(): - ctype = response.get('Content-Type', '').lower() - if not ctype.startswith("text/") or "javascript" in ctype: - return response + patch_vary_headers(response, ('Accept-Encoding',)) ae = request.META.get('HTTP_ACCEPT_ENCODING', '') if not re_accepts_gzip.search(ae): |
