diff options
| author | Florian Apolloner <florian@apolloner.eu> | 2012-08-01 10:56:35 +0200 |
|---|---|---|
| committer | Florian Apolloner <florian@apolloner.eu> | 2012-08-01 11:01:52 +0200 |
| commit | d0d5dc6cd76f01c8a71b677357ad2f702cb54416 (patch) | |
| tree | f49b6f584ff15bd83e83cb0f28b2560af2a764c7 /django/http/__init__.py | |
| parent | e2ac91735f8acb9d1b792f510ed38e4afcb744b5 (diff) | |
[1.3.x] Fixed #18692 -- Restored python 2.4 compatibility.
Thanks to chipx86 for the report.
Diffstat (limited to 'django/http/__init__.py')
| -rw-r--r-- | django/http/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py index 74113b080a..2dfe12ee4b 100644 --- a/django/http/__init__.py +++ b/django/http/__init__.py @@ -642,8 +642,8 @@ class HttpResponseRedirectBase(HttpResponse): def __init__(self, redirect_to): super(HttpResponseRedirectBase, self).__init__() parsed = urlparse(redirect_to) - if parsed.scheme and parsed.scheme not in self.allowed_schemes: - raise SuspiciousOperation("Unsafe redirect to URL with scheme '%s'" % parsed.scheme) + if parsed[0] and parsed[0] not in self.allowed_schemes: + raise SuspiciousOperation("Unsafe redirect to URL with scheme '%s'" % parsed[0]) self['Location'] = iri_to_uri(redirect_to) class HttpResponseRedirect(HttpResponseRedirectBase): |
