Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #10630 -- Be even more conservative in GZipMiddleware for IE.

Patch from sebastien_noack.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10541 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 499a8ac3317aa67d3bd5f84fd668304b6adcdc30 1 parent 87e6939
Malcolm Tredinnick authored April 12, 2009

Showing 1 changed file with 2 additions and 3 deletions. Show diff stats Hide diff stats

  1. 5  django/middleware/gzip.py
5  django/middleware/gzip.py
@@ -22,11 +22,10 @@ def process_response(self, request, response):
22 22
         if response.has_header('Content-Encoding'):
23 23
             return response
24 24
 
25  
-        # Older versions of IE have issues with gzipped pages containing either
26  
-        # Javascript and PDF.
  25
+        # MSIE have issues with gzipped respones of various content types.
27 26
         if "msie" in request.META.get('HTTP_USER_AGENT', '').lower():
28 27
             ctype = response.get('Content-Type', '').lower()
29  
-            if "javascript" in ctype or ctype == "application/pdf":
  28
+            if not ctype.startswith("text/") or "javascript" in ctype:
30 29
                 return response
31 30
 
32 31
         ae = request.META.get('HTTP_ACCEPT_ENCODING', '')

0 notes on commit 499a8ac

Please sign in to comment.
Something went wrong with that request. Please try again.