1
0
mirror of https://github.com/django/django.git synced 2025-10-25 14:46:09 +00:00

Fixed the breakage in [6164] in a different, better way: HttpResponse now implements __contains__ along with __get/set/delitem__, as it should. This is a bit more robust, and should prevent similar breakage from user code.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss
2007-09-14 21:41:48 +00:00
parent 5a5d8a90b5
commit 4100eab823
2 changed files with 3 additions and 1 deletions

View File

@@ -142,7 +142,7 @@ def fix_location_header(request, response):
Code constructing response objects is free to insert relative paths and
this function converts them to absolute paths.
"""
if 'location' in response.headers and http.get_host(request):
if 'Location' in response and http.get_host(request):
response['Location'] = request.build_absolute_uri(response['Location'])
return response