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
This commit is contained in:
parent
fc1fbf614f
commit
fc6649092a
|
@ -52,8 +52,8 @@ class HttpRequest(object):
|
||||||
else:
|
else:
|
||||||
# Reconstruct the host using the algorithm from PEP 333.
|
# Reconstruct the host using the algorithm from PEP 333.
|
||||||
host = self.META['SERVER_NAME']
|
host = self.META['SERVER_NAME']
|
||||||
server_port = self.META['SERVER_PORT']
|
server_port = str(self.META['SERVER_PORT'])
|
||||||
if server_port != (self.is_secure() and 443 or 80):
|
if server_port != (self.is_secure() and '443' or '80'):
|
||||||
host = '%s:%s' % (host, server_port)
|
host = '%s:%s' % (host, server_port)
|
||||||
return host
|
return host
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue