[wsgi] look at wsgi.url_scheme to decide if we're on https
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 06 May 2014 15:59:39 +0200
changeset 9737 c6f47e635845
parent 9736 e0b3fcf1c205
child 9740 c0239d8ae742
[wsgi] look at wsgi.url_scheme to decide if we're on https The server/gateway is supposed to fill it in for us.
wsgi/request.py
--- a/wsgi/request.py	Mon Mar 24 10:34:58 2014 +0100
+++ b/wsgi/request.py	Tue May 06 15:59:39 2014 +0200
@@ -59,7 +59,7 @@
 
         headers_in = dict((normalize_header(k[5:]), v) for k, v in self.environ.items()
                           if k.startswith('HTTP_'))
-        https = environ.get("HTTPS") in ('yes', 'on', '1')
+        https = self.is_secure()
         post, files = self.get_posted_data()
 
         super(CubicWebWsgiRequest, self).__init__(vreg, https, post,