changeset 4391:3e019f6ae381

fixing https detection for servers using HTTPS=1 and also for wsgi servers not using HTTPS/SSL_ environment, but just wsgi.url_scheme
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 11 Oct 2008 14:46:12 +0200
parents c5268cc28125
children bf543d0796c8
files MoinMoin/request/__init__.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/request/__init__.py	Thu Oct 09 21:44:07 2008 +0200
+++ b/MoinMoin/request/__init__.py	Sat Oct 11 14:46:12 2008 +0200
@@ -452,7 +452,8 @@
         """
         self.is_ssl = bool(env.get('SSL_PROTOCOL') or
                            env.get('SSL_PROTOCOL_VERSION') or
-                           env.get('HTTPS') == 'on')
+                           env.get('HTTPS').lower() in ('on', '1') or
+                           env.get('wsgi.url_scheme') == 'https')
 
     def setHost(self, host=None):
         """ Set http_host