Loading django/http/__init__.py +2 −2 Original line number Diff line number Diff line Loading @@ -642,8 +642,8 @@ class HttpResponseRedirectBase(HttpResponse): def __init__(self, redirect_to): super(HttpResponseRedirectBase, self).__init__() parsed = urlparse(redirect_to) if parsed.scheme and parsed.scheme not in self.allowed_schemes: raise SuspiciousOperation("Unsafe redirect to URL with scheme '%s'" % parsed.scheme) if parsed[0] and parsed[0] not in self.allowed_schemes: raise SuspiciousOperation("Unsafe redirect to URL with scheme '%s'" % parsed[0]) self['Location'] = iri_to_uri(redirect_to) class HttpResponseRedirect(HttpResponseRedirectBase): Loading django/http/utils.py +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ def fix_IE_for_vary(request, response): # The first part of the Content-Type field will be the MIME type, # everything after ';', such as character-set, can be ignored. mime_type = response.get('Content-Type', '').partition(';')[0] mime_type = response.get('Content-Type', '').split(';', 1)[0] if mime_type not in safe_mime_types: try: del response['Vary'] Loading Loading
django/http/__init__.py +2 −2 Original line number Diff line number Diff line Loading @@ -642,8 +642,8 @@ class HttpResponseRedirectBase(HttpResponse): def __init__(self, redirect_to): super(HttpResponseRedirectBase, self).__init__() parsed = urlparse(redirect_to) if parsed.scheme and parsed.scheme not in self.allowed_schemes: raise SuspiciousOperation("Unsafe redirect to URL with scheme '%s'" % parsed.scheme) if parsed[0] and parsed[0] not in self.allowed_schemes: raise SuspiciousOperation("Unsafe redirect to URL with scheme '%s'" % parsed[0]) self['Location'] = iri_to_uri(redirect_to) class HttpResponseRedirect(HttpResponseRedirectBase): Loading
django/http/utils.py +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ def fix_IE_for_vary(request, response): # The first part of the Content-Type field will be the MIME type, # everything after ';', such as character-set, can be ignored. mime_type = response.get('Content-Type', '').partition(';')[0] mime_type = response.get('Content-Type', '').split(';', 1)[0] if mime_type not in safe_mime_types: try: del response['Vary'] Loading