diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-04-12 03:50:47 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-04-12 03:50:47 +0000 |
| commit | 87e6939372790662752e227557415d3f4e180992 (patch) | |
| tree | e3b84e8c9f7c24eaa5c65899d3c4a2d43bb9aaec /django/http | |
| parent | 794f2d121e9fd51debfabc8bdc8d6833dc61d7a4 (diff) | |
Fixed #10267 -- Correctly handle IRIs in HttpResponse.build_absolute_uri().
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/http')
| -rw-r--r-- | django/http/__init__.py | 6 |
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 |
