Code

Ticket #4710: is_secure.diff

File is_secure.diff, 646 bytes (added by amax@…, 7 years ago)

patch

Line 
1Index: core/handlers/modpython.py
2===================================================================
3--- core/handlers/modpython.py  (revision 252)
4+++ core/handlers/modpython.py  (working copy)
5@@ -42,7 +42,7 @@
6 
7     def is_secure(self):
8         # Note: modpython 3.2.10+ has req.is_https(), but we need to support previous versions
9-        return self._req.subprocess_env.has_key('HTTPS') and self._req.subprocess_env['HTTPS'] == 'on'
10+        return self._req.subprocess_env.has_key('HTTPS') and self._req.subprocess_env['HTTPS'].lower() in ['on', '1']
11 
12     def _load_post_and_files(self):
13         "Populates self._post and self._files"