[zope2-tracker] [Bug 950689] [NEW] HTTPS requests are not detected if running under mod_wsgi

stephan_hofmockel 950689 at bugs.launchpad.net
Fri Mar 9 10:10:53 UTC 2012


Public bug reported:

ZPublisher/HTTPRequest.py has a detection if the protcol is https or
not. The detection looks like this

if 'HTTPS' in environ and (environ['HTTPS'] == "on" or environ['HTTPS']
== "ON"):


However mod_wsgi version 3.3 constructs the following environment

{'DOCUMENT_ROOT': '/etc/apache2/htdocs',
'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTPS': '1',
 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_COOKIE': 'tree-s="eJzT0MgpMOQKVneEAfdQW3WuAiOuxJICYy49A
.........}

So the detection does not work and all generated links have 'http'
instead of 'https'

** Affects: zope2
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.
https://bugs.launchpad.net/bugs/950689

Title:
  HTTPS requests are not detected if running under mod_wsgi

To manage notifications about this bug go to:
https://bugs.launchpad.net/zope2/+bug/950689/+subscriptions


More information about the zope2-tracker mailing list