Ticket #5313: gzipdiff.diff

File gzipdiff.diff, 647 bytes (added by mgiger@…, 7 years ago)
  • middleware/gzip.py

     
    1515       
    1616        # Avoid gzipping if we've already got a content-encoding or if the
    1717        # 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
    1919        if response.has_header('Content-Encoding') or is_js:
    2020            return response
    2121
Back to Top