Django

Code

Changeset 8666

Show
Ignore:
Timestamp:
08/28/08 11:18:32 (3 months ago)
Author:
jacob
Message:

Fixed an inconsistancy in redirects with META['SERVER_PORT'] being either a string or an int.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/http/__init__.py

    r8490 r8666  
    5353            # Reconstruct the host using the algorithm from PEP 333. 
    5454            host = self.META['SERVER_NAME'] 
    55             server_port = self.META['SERVER_PORT'] 
    56             if server_port != (self.is_secure() and 443 or 80): 
     55            server_port = str(self.META['SERVER_PORT']) 
     56            if server_port != (self.is_secure() and '443' or '80'): 
    5757                host = '%s:%s' % (host, server_port) 
    5858        return host