Ticket #5313: gzipdiff.diff
File gzipdiff.diff, 647 bytes (added by , 17 years ago) |
---|
-
middleware/gzip.py
15 15 16 16 # Avoid gzipping if we've already got a content-encoding or if the 17 17 # content-type is Javascript (silly IE...) 18 is_js = "javascript" in response.headers.get('Content-Type', '').lower() 18 is_js = "javascript" in response.headers.get('Content-Type', '').lower() and request.META.get('HTTP_USER_AGENT', '').find('MSIE') != -1 19 19 if response.has_header('Content-Encoding') or is_js: 20 20 return response 21 21