Commits

Robert Brewer  committed 7c37e7c

Some https fixlets in wsgiserver.

  • Participants
  • Parent commits 2b254ad
  • Branches gateways

Comments (0)

Files changed (2)

File cherrypy/wsgiserver/__init__.py

         send_headers.
     """
     
-    scheme = "http"
-    
     def __init__(self, server, conn):
         self.server= server
         self.conn = conn
         
         self.ready = False
         self.started_request = False
+        self.scheme = "http"
+        if self.server.ssl_adapter is not None:
+            self.scheme = "https"
+        self.inheaders = {}
+        
         self.status = ""
-        self.inheaders = {}
         self.outheaders = []
         self.sent_headers = False
         self.close_connection = False

File cherrypy/wsgiserver/ssl_pyopenssl.py

     def get_environ(self):
         """Return WSGI environ entries to be merged into each request."""
         ssl_environ = {
-            "wsgi.url_scheme": "https",
             "HTTPS": "on",
             # pyOpenSSL doesn't provide access to any of these AFAICT
 ##            'SSL_PROTOCOL': 'SSLv2',