Ticket #5772: django-gzip.patch

File django-gzip.patch, 558 bytes (added by Simon Law <simon@…>, 17 years ago)

Patch

  • django/middleware/gzip.py

    diff --git a/django/middleware/gzip.py b/django/middleware/gzip.py
    a b class GZipMiddleware(object):  
    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()
    2424        if response.has_header('Content-Encoding') or is_js:
    2525            return response
    2626
Back to Top