summaryrefslogtreecommitdiff
path: root/django/core/handlers/modpython.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-11-21 12:00:51 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-11-21 12:00:51 +0000
commit2967106274622123f92b9b1a99212871d111c0a0 (patch)
tree3cb9d73c2f89d1c43b638b30c0a63fd8c7f6e647 /django/core/handlers/modpython.py
parent150a598d0cdeb1c2f2b82ade18dfc415c6cc9b36 (diff)
Fixed #2782 -- Make the server port available through the modpython handler.
(Originally applied in r3866, reverted in r3927 and now verified as correct). git-svn-id: http://code.djangoproject.com/svn/django/trunk@9512 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/handlers/modpython.py')
-rw-r--r--django/core/handlers/modpython.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py
index c89f202c77..c6dcf23e9a 100644
--- a/django/core/handlers/modpython.py
+++ b/django/core/handlers/modpython.py
@@ -147,7 +147,7 @@ class ModPythonRequest(http.HttpRequest):
'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'
}