summaryrefslogtreecommitdiff
path: root/django/core/handlers/modpython.py
diff options
context:
space:
mode:
authorRobin Munn <robin.munn@gmail.com>2006-11-08 04:50:01 +0000
committerRobin Munn <robin.munn@gmail.com>2006-11-08 04:50:01 +0000
commitdadfca08c0db567ce33284aaa8eb388cf667a836 (patch)
treeab7255eeee1bbe03d95652cc74a3843fa052d8ac /django/core/handlers/modpython.py
parent0b059aa4eadc1d95ceca3a32821b65a9fb2a53e8 (diff)
sqlalchemy: Merged revisions 3918 to 4053 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/sqlalchemy@4054 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/handlers/modpython.py')
-rw-r--r--django/core/handlers/modpython.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py
index bf759db068..5fc41a048b 100644
--- a/django/core/handlers/modpython.py
+++ b/django/core/handlers/modpython.py
@@ -41,6 +41,7 @@ class ModPythonRequest(http.HttpRequest):
return '%s%s' % (self.path, self._req.args and ('?' + self._req.args) or '')
def is_secure(self):
+ # Note: modpython 3.2.10+ has req.is_https(), but we need to support previous versions
return self._req.subprocess_env.has_key('HTTPS') and self._req.subprocess_env['HTTPS'] == 'on'
def _load_post_and_files(self):
@@ -102,7 +103,7 @@ class ModPythonRequest(http.HttpRequest):
'REQUEST_METHOD': self._req.method,
'SCRIPT_NAME': None, # Not supported
'SERVER_NAME': self._req.server.server_hostname,
- 'SERVER_PORT': str(self._req.connection.local_addr[1]),
+ 'SERVER_PORT': self._req.server.port,
'SERVER_PROTOCOL': self._req.protocol,
'SERVER_SOFTWARE': 'mod_python'
}