Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

[1.0.X] Fixed #10630 -- Be even more conservative in GZipMiddleware f…

…or IE.

Patch from sebastien_noack.

Backport of r10541 from trunk.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 6771f4e commit a83e4cb1959edc1d5dc5ebe4e1065bbe254062a7 @malcolmt malcolmt committed
Showing with 2 additions and 3 deletions.
  1. +2 −3 django/middleware/
5 django/middleware/
@@ -22,11 +22,10 @@ def process_response(self, request, response):
if response.has_header('Content-Encoding'):
return response
- # Older versions of IE have issues with gzipped pages containing either
- # Javascript and PDF.
+ # MSIE have issues with gzipped respones of various content types.
if "msie" in request.META.get('HTTP_USER_AGENT', '').lower():
ctype = response.get('Content-Type', '').lower()
- if "javascript" in ctype or ctype == "application/pdf":
+ if not ctype.startswith("text/") or "javascript" in ctype:
return response
ae = request.META.get('HTTP_ACCEPT_ENCODING', '')

0 comments on commit a83e4cb

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