Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit fc6649092aae5667ee6ed9b16ed81ebbe41a7bf4 1 parent fc1fbf6
@jacobian jacobian authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/http/__init__.py
View
4 django/http/__init__.py
@@ -52,8 +52,8 @@ def get_host(self):
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
Please sign in to comment.
Something went wrong with that request. Please try again.