From dadfca08c0db567ce33284aaa8eb388cf667a836 Mon Sep 17 00:00:00 2001 From: Robin Munn Date: Wed, 8 Nov 2006 04:50:01 +0000 Subject: 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 --- django/core/handlers/modpython.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'django/core/handlers/modpython.py') 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' } -- cgit v1.3