[wsgi] the spec says wsgi.url_scheme *must* be provided
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 06 May 2014 16:00:36 +0200
changeset 9741 b6cc9da206df
parent 9740 c0239d8ae742
child 9755 566d90bdc565
[wsgi] the spec says wsgi.url_scheme *must* be provided No need to be defensive, anything else is a bug in the gateway.
wsgi/request.py
--- a/wsgi/request.py	Mon May 12 12:37:19 2014 +0200
+++ b/wsgi/request.py	Tue May 06 16:00:36 2014 +0200
@@ -127,8 +127,7 @@
         return '%s%s' % (self.path, self.environ.get('QUERY_STRING', '') and ('?' + self.environ.get('QUERY_STRING', '')) or '')
 
     def is_secure(self):
-        return 'wsgi.url_scheme' in self.environ \
-            and self.environ['wsgi.url_scheme'] == 'https'
+        return self.environ['wsgi.url_scheme'] == 'https'
 
     def get_posted_data(self):
         # The WSGI spec says 'QUERY_STRING' may be absent.