mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #28795 -- Removed 'not in' checks and used dict.setdefault().
This commit is contained in:
committed by
Tim Graham
parent
a2ec1e6b2d
commit
23bf4ad87f
@@ -57,6 +57,5 @@ class LocaleMiddleware(MiddlewareMixin):
|
||||
|
||||
if not (i18n_patterns_used and language_from_path):
|
||||
patch_vary_headers(response, ('Accept-Language',))
|
||||
if 'Content-Language' not in response:
|
||||
response['Content-Language'] = language
|
||||
response.setdefault('Content-Language', language)
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user