Author: mtredinnick Date: 2009-04-11 23:14:23 -0500 (Sat, 11 Apr 2009) New Revision: 10541
Modified: django/trunk/django/middleware/gzip.py Log: Fixed #10630 -- Be even more conservative in GZipMiddleware for IE. Patch from sebastien_noack. Modified: django/trunk/django/middleware/gzip.py =================================================================== --- django/trunk/django/middleware/gzip.py 2009-04-12 03:54:49 UTC (rev 10540) +++ django/trunk/django/middleware/gzip.py 2009-04-12 04:14:23 UTC (rev 10541) @@ -22,11 +22,10 @@ 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', '') --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---