Ticket #2449: gzip.2.diff

File gzip.2.diff, 533 bytes (added by James Bennett, 18 years ago)

Better patch using Simon's suggestion

  • gzip.py

     
    1212    """
    1313    def process_response(self, request, response):
    1414        patch_vary_headers(response, ('Accept-Encoding',))
    15         if response.has_header('Content-Encoding'):
     15        if response.has_header('Content-Encoding') or 'javascript' in response.headers['Content-Type'].lower():
    1616            return response
    1717
    1818        ae = request.META.get('HTTP_ACCEPT_ENCODING', '')
Back to Top