Ticket #5313: js_gzip.2.diff
File js_gzip.2.diff, 671 bytes (added by , 17 years ago) |
---|
-
django/middleware/gzip.py
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 = ("msie" in request.META.get('HTTP_USER_AGENT', '').lower() 24 and "javascript" in response.get('Content-Type', '').lower()) 24 25 if response.has_header('Content-Encoding') or is_js: 25 26 return response 26 27