diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-11-21 12:08:11 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-11-21 12:08:11 +0000 |
| commit | 8bcde6492ae77aec45e62205e6d133bf91c361dd (patch) | |
| tree | 55e9fce7b9a51fced16db5f0909de5125c5786c9 /django/core | |
| parent | d75628fbe8742b27ac1f4e7f0ae98d73bc4030a5 (diff) | |
[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().
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9513 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core')
| -rw-r--r-- | django/core/handlers/modpython.py | 2 |
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' } |
