Browse files

[1.0.X] Fixed #2782 -- Make the server port available through the mod…


handler.  (Originally applied in r3866, reverted in r3927 and now verified as

Backport of r9512 from trunk. This is a bugfix, since the value is used in

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent d75628f commit 8bcde6492ae77aec45e62205e6d133bf91c361dd @malcolmt malcolmt committed Nov 21, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/core/handlers/
2 django/core/handlers/
@@ -147,7 +147,7 @@ def _get_meta(self):
'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'

0 comments on commit 8bcde64

Please sign in to comment.