Ticket #15046: chromeframe_fix_rev_15168.diff

File chromeframe_fix_rev_15168.diff, 1.0 KB (added by chrj, 4 years ago)
  • django/http/utils.py

     
    3838    while expecting the browser to cache it (only when the browser is IE). This
    3939    leads to IE not allowing the client to download.
    4040    """
    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:
    4243        return response
    4344
    4445    offending_headers = ('no-cache', 'no-store')
     
    6667    by clearing the Vary header whenever the mime-type is not safe
    6768    enough for Internet Explorer to handle.  Poor thing.
    6869    """
    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:
    7072        return response
    7173
    7274    # These mime-types that are decreed "Vary-safe" for IE:
Back to Top