summaryrefslogtreecommitdiff
path: root/django/http
diff options
context:
space:
mode:
Diffstat (limited to 'django/http')
-rw-r--r--django/http/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py
index 812a0fdfa1..7c6b8f9a0f 100644
--- a/django/http/__init__.py
+++ b/django/http/__init__.py
@@ -72,7 +72,7 @@ class HttpRequest(object):
current_uri = '%s://%s%s' % (self.is_secure() and 'https' or 'http',
self.get_host(), self.path)
location = urljoin(current_uri, location)
- return location
+ return iri_to_uri(location)
def is_secure(self):
return os.environ.get("HTTPS") == "on"
@@ -398,14 +398,14 @@ class HttpResponseRedirect(HttpResponse):
def __init__(self, redirect_to):
HttpResponse.__init__(self)
- self['Location'] = iri_to_uri(redirect_to)
+ self['Location'] = redirect_to
class HttpResponsePermanentRedirect(HttpResponse):
status_code = 301
def __init__(self, redirect_to):
HttpResponse.__init__(self)
- self['Location'] = iri_to_uri(redirect_to)
+ self['Location'] = redirect_to
class HttpResponseNotModified(HttpResponse):
status_code = 304