Ticket #5772: django-gzip.patch
File django-gzip.patch, 558 bytes (added by , 17 years ago) |
---|
-
django/middleware/gzip.py
diff --git a/django/middleware/gzip.py b/django/middleware/gzip.py
a b class GZipMiddleware(object): 20 20 21 21 # Avoid gzipping if we've already got a content-encoding or if the 22 22 # content-type is Javascript (silly IE...) 23 is_js = "javascript" in response.get(' Content-Type', '').lower()23 is_js = "javascript" in response.get('content-type', '').lower() 24 24 if response.has_header('Content-Encoding') or is_js: 25 25 return response 26 26