Author: mtredinnick
Date: 2008-11-21 06:08:11 -0600 (Fri, 21 Nov 2008)
New Revision: 9513
Modified:
django/branches/releases/1.0.X/django/core/handlers/modpython.py
Log:
[1.0.X] Fixed #2782 -- Make the server port available through the modpython
handler. (Originally applied in r3866, reverted in r3927 and now verified as
correct).
Backport of r9512 from trunk. This is a bugfix, since the value is used in
HttpRequest.get_host().
Modified: django/branches/releases/1.0.X/django/core/handlers/modpython.py
===================================================================
--- django/branches/releases/1.0.X/django/core/handlers/modpython.py
2008-11-21 12:00:51 UTC (rev 9512)
+++ django/branches/releases/1.0.X/django/core/handlers/modpython.py
2008-11-21 12:08:11 UTC (rev 9513)
@@ -147,7 +147,7 @@
'REQUEST_METHOD': self._req.method,
'SCRIPT_NAME': self.django_root,
'SERVER_NAME': self._req.server.server_hostname,
- 'SERVER_PORT': self._req.server.port,
+ 'SERVER_PORT': self._req.connection.local_addr[1],
'SERVER_PROTOCOL': self._req.protocol,
'SERVER_SOFTWARE': 'mod_python'
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---