Ticket #4710: is_secure.patch
File is_secure.patch, 877 bytes (added by , 17 years ago) |
---|
-
django/core/handlers/modpython.py
42 42 return '%s%s' % (self.path, self._req.args and ('?' + self._req.args) or '') 43 43 44 44 def is_secure(self): 45 # Note: modpython 3.2.10+ has req.is_https(), but we need to support previous versions 46 return 'HTTPS' in self._req.subprocess_env and self._req.subprocess_env['HTTPS'] == 'on' 45 try: 46 return self._req.is_https() 47 except AttributeError: 48 # mod_python versions <3.2.10 don't have req.is_https(). 49 return self._req.subprocess_env.get('HTTPS', '').lower() in ('on', '1') 47 50 48 51 def _load_post_and_files(self): 49 52 "Populates self._post and self._files"