diff --git a/django/core/handlers/base.py b/django/core/handlers/base.py index 768fc14b00..21737f682f 100644 --- a/django/core/handlers/base.py +++ b/django/core/handlers/base.py @@ -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.headers and http.get_host(request): response['Location'] = request.build_absolute_uri(response['Location']) return response