summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2009-04-12 03:54:49 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2009-04-12 03:54:49 +0000
commit6771f4e348926608a86bc5152defd90a82fa3624 (patch)
tree24bd6d26981c82358384257a8d09392615a839f1 /django
parent18baad0d2fd3ede36c5982c9a5fd597edb7c6622 (diff)
[1.0.X] Fixed #10267 -- Correctly handle IRIs in HttpResponse.build_absolute_uri().
Backport of r10539 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10540 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-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