Ticket #16632: 16632.patch

File 16632.patch, 566 bytes (added by Aymeric Augustin, 13 years ago)
  • django/http/utils.py

     
    7676
    7777    # The first part of the Content-Type field will be the MIME type,
    7878    # everything after ';', such as character-set, can be ignored.
    79     if response['Content-Type'].split(';')[0] not in safe_mime_types:
     79    if response.get('Content-Type', '').split(';')[0] not in safe_mime_types:
    8080        try:
    8181            del response['Vary']
    8282        except KeyError:
Back to Top