mirror of https://github.com/django/django.git
Fixed #8121 -- Don't override the Content-Language HTTP header in the locale
middleware if it's already been set. Thanks, jcassee. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8259 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
99594011a2
commit
e8f18643cf
|
@ -19,6 +19,7 @@ class LocaleMiddleware(object):
|
|||
|
||||
def process_response(self, request, response):
|
||||
patch_vary_headers(response, ('Accept-Language',))
|
||||
response['Content-Language'] = translation.get_language()
|
||||
if 'Content-Language' not in response:
|
||||
response['Content-Language'] = translation.get_language()
|
||||
translation.deactivate()
|
||||
return response
|
||||
|
|
Loading…
Reference in New Issue