[Checkins] SVN: Zope/branches/2.13/ LP #950689: Fix HTTPS detection under mod_wsgi.

Hano Schlichting cvs-admin at zope.org
Mon May 28 13:29:34 UTC 2012


Log message for revision 126516:
  LP #950689: Fix HTTPS detection under mod_wsgi.
  

Changed:
  U   Zope/branches/2.13/doc/CHANGES.rst
  U   Zope/branches/2.13/src/ZPublisher/HTTPRequest.py

-=-
Modified: Zope/branches/2.13/doc/CHANGES.rst
===================================================================
--- Zope/branches/2.13/doc/CHANGES.rst	2012-05-28 13:15:14 UTC (rev 126515)
+++ Zope/branches/2.13/doc/CHANGES.rst	2012-05-28 13:29:31 UTC (rev 126516)
@@ -8,6 +8,8 @@
 2.13.14 (unreleased)
 --------------------
 
+- LP #950689: Fix HTTPS detection under mod_wsgi.
+
 - LP #975039: Don't translate interface names in edit_markers ZMI view.
 
 - LP #838978: Fixed TypeError in cache_detail ZMI view.

Modified: Zope/branches/2.13/src/ZPublisher/HTTPRequest.py
===================================================================
--- Zope/branches/2.13/src/ZPublisher/HTTPRequest.py	2012-05-28 13:15:14 UTC (rev 126515)
+++ Zope/branches/2.13/src/ZPublisher/HTTPRequest.py	2012-05-28 13:29:31 UTC (rev 126516)
@@ -383,8 +383,8 @@
         if server_url is not None:
             other['SERVER_URL'] = server_url = server_url.strip()
         else:
-            if 'HTTPS' in environ and (
-                environ['HTTPS'] == "on" or environ['HTTPS'] == "ON"):
+            https_environ = environ.get('HTTPS', False)
+            if https_environ and https_environ in ('on', 'ON', '1'):
                 protocol = 'https'
             elif ('SERVER_PORT_SECURE' in environ and
                 environ['SERVER_PORT_SECURE'] == "1"):



More information about the checkins mailing list