Author: jacob
Date: 2008-08-28 11:18:32 -0500 (Thu, 28 Aug 2008)
New Revision: 8666

Modified:
   django/trunk/django/http/__init__.py
Log:
Fixed an inconsistancy in redirects with `META['SERVER_PORT']` being either a 
string or an int.

Modified: django/trunk/django/http/__init__.py
===================================================================
--- django/trunk/django/http/__init__.py        2008-08-28 16:15:44 UTC (rev 
8665)
+++ django/trunk/django/http/__init__.py        2008-08-28 16:18:32 UTC (rev 
8666)
@@ -52,8 +52,8 @@
         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
 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to