summaryrefslogtreecommitdiff
path: root/django/http
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2008-08-28 16:18:32 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2008-08-28 16:18:32 +0000
commitfc6649092aae5667ee6ed9b16ed81ebbe41a7bf4 (patch)
tree30233a336149183a6c6399d08488981aa69f59b9 /django/http
parentfc1fbf614fb52f383eb7fde88db31d9253dc6fa9 (diff)
Fixed an inconsistancy in redirects with `META['SERVER_PORT']` being either a string or an int.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8666 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/http')
-rw-r--r--django/http/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py
index 6d24e0a23a..ded6d090b1 100644
--- a/django/http/__init__.py
+++ b/django/http/__init__.py
@@ -52,8 +52,8 @@ class HttpRequest(object):
else:
# Reconstruct the host using the algorithm from PEP 333.
host = self.META['SERVER_NAME']
- server_port = self.META['SERVER_PORT']
- if server_port != (self.is_secure() and 443 or 80):
+ server_port = str(self.META['SERVER_PORT'])
+ if server_port != (self.is_secure() and '443' or '80'):
host = '%s:%s' % (host, server_port)
return host