summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2011-01-27 03:52:14 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2011-01-27 03:52:14 +0000
commitd073d30e45c1bfbd05bacf9dfb361bf7589983bf (patch)
treefc249cdc6da05b6ceb68df2a9b682db6a74d1705
parent407208b0c2b237f8ba7b1bd9d209b1053e6c77c4 (diff)
[1.2.X] Fixed #15046 -- Added "CHROMEFRAME" as a user agent alias for various MSIE fixes. Thanks to chrj for the report and patch.
Backport of r15340 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15344 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/http/utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/django/http/utils.py b/django/http/utils.py
index 4dc05a2e33..5eea23907b 100644
--- a/django/http/utils.py
+++ b/django/http/utils.py
@@ -38,7 +38,8 @@ def fix_IE_for_attach(request, response):
while expecting the browser to cache it (only when the browser is IE). This
leads to IE not allowing the client to download.
"""
- if 'MSIE' not in request.META.get('HTTP_USER_AGENT', '').upper():
+ useragent = request.META.get('HTTP_USER_AGENT', '').upper()
+ if 'MSIE' not in useragent and 'CHROMEFRAME' not in useragent:
return response
offending_headers = ('no-cache', 'no-store')
@@ -66,7 +67,8 @@ def fix_IE_for_vary(request, response):
by clearing the Vary header whenever the mime-type is not safe
enough for Internet Explorer to handle. Poor thing.
"""
- if 'MSIE' not in request.META.get('HTTP_USER_AGENT', '').upper():
+ useragent = request.META.get('HTTP_USER_AGENT', '').upper()
+ if 'MSIE' not in useragent and 'CHROMEFRAME' not in useragent:
return response
# These mime-types that are decreed "Vary-safe" for IE: