Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #15046 -- Added "CHROMEFRAME" as a user agent alias for various…

… MSIE fixes. Thanks to chrj for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1f5309a99e94aec310c1fcd9117559356db40a65 1 parent 4a3ea26
Russell Keith-Magee authored January 27, 2011

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

  1. 6  django/http/utils.py
6  django/http/utils.py
@@ -38,7 +38,8 @@ def fix_IE_for_attach(request, response):
38 38
     while expecting the browser to cache it (only when the browser is IE). This
39 39
     leads to IE not allowing the client to download.
40 40
     """
41  
-    if 'MSIE' not in request.META.get('HTTP_USER_AGENT', '').upper():
  41
+    useragent = request.META.get('HTTP_USER_AGENT', '').upper()
  42
+    if 'MSIE' not in useragent and 'CHROMEFRAME' not in useragent:
42 43
         return response
43 44
 
44 45
     offending_headers = ('no-cache', 'no-store')
@@ -66,7 +67,8 @@ def fix_IE_for_vary(request, response):
66 67
     by clearing the Vary header whenever the mime-type is not safe
67 68
     enough for Internet Explorer to handle.  Poor thing.
68 69
     """
69  
-    if 'MSIE' not in request.META.get('HTTP_USER_AGENT', '').upper():
  70
+    useragent = request.META.get('HTTP_USER_AGENT', '').upper()
  71
+    if 'MSIE' not in useragent and 'CHROMEFRAME' not in useragent:
70 72
         return response
71 73
 
72 74
     # These mime-types that are decreed "Vary-safe" for IE:

0 notes on commit 1f5309a

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