Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit e8f18643cf51d9ef22868d32060c8645b269d328 1 parent 9959401
Malcolm Tredinnick authored August 09, 2008

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  django/middleware/locale.py
3  django/middleware/locale.py
@@ -19,6 +19,7 @@ def process_request(self, request):
19 19
 
20 20
     def process_response(self, request, response):
21 21
         patch_vary_headers(response, ('Accept-Language',))
22  
-        response['Content-Language'] = translation.get_language()
  22
+        if 'Content-Language' not in response:
  23
+            response['Content-Language'] = translation.get_language()
23 24
         translation.deactivate()
24 25
         return response

0 notes on commit e8f1864

Please sign in to comment.
Something went wrong with that request. Please try again.