Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Multilingual middleware checks for Content-Type header before using it

  • Loading branch information...
commit ee301e3438e22bdd0537f719b09abd62ee7ada97 1 parent 8c4f789
@bercab authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  cms/middleware/multilingual.py
View
1  cms/middleware/multilingual.py
@@ -118,6 +118,7 @@ def process_response(self, request, response):
not path.startswith(settings.STATIC_URL) and
not (getattr(settings, 'STATIC_URL', False) and path.startswith(settings.STATIC_URL)) and
response.status_code == 200 and
+ response.has_header('Content-Type') and
response._headers['content-type'][1].split(';')[0] == "text/html"):
pages_root = urllib.unquote(reverse("pages-root"))
try:
Please sign in to comment.
Something went wrong with that request. Please try again.