From 6771f4e348926608a86bc5152defd90a82fa3624 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 12 Apr 2009 03:54:49 +0000 Subject: [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 --- django/http/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'django') 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 -- cgit v1.3