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

Fixed #23960 -- Removed http.fix_location_header

Thanks Carl Meyer for the report and Tim Graham for the review.
This commit is contained in:
Claude Paroz
2015-03-13 23:40:14 +01:00
parent 0339844b70
commit a0c2eb46dd
20 changed files with 127 additions and 156 deletions

View File

@@ -40,16 +40,12 @@ class LocaleMiddleware(object):
if path_valid:
script_prefix = get_script_prefix()
language_url = "%s://%s%s" % (
request.scheme,
request.get_host(),
# insert language after the script prefix and before the
# rest of the URL
request.get_full_path().replace(
script_prefix,
'%s%s/' % (script_prefix, language),
1
)
# Insert language after the script prefix and before the
# rest of the URL
language_url = request.get_full_path().replace(
script_prefix,
'%s%s/' % (script_prefix, language),
1
)
return self.response_redirect_class(language_url)