Ticket #5313: js_gzip.diff

File js_gzip.diff, 671 bytes (added by jmelesky, 17 years ago)

updated patch

  • django/middleware/gzip.py

     
    2020       
    2121        # Avoid gzipping if we've already got a content-encoding or if the
    2222        # 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                 and "msie" in request.META.get('HTTP_USER_AGENT', '').lower())
    2425        if response.has_header('Content-Encoding') or is_js:
    2526            return response
    2627
Back to Top