mercurial/hgweb/hgweb_mod.py
changeset 4872 419a6f715c6a
parent 4868 192cd95c2ba8
child 4874 d9e385a7a806
--- a/mercurial/hgweb/hgweb_mod.py	Thu Jul 12 22:44:16 2007 -0700
+++ b/mercurial/hgweb/hgweb_mod.py	Thu Jul 12 22:55:44 2007 -0700
@@ -787,7 +787,8 @@
             style = req.form['style'][0]
         mapfile = style_map(self.templatepath, style)
 
-        if req.env.get('HTTPS'):
+        proto = req.env.get('wsgi.url_scheme')
+        if proto == 'https':
             proto = 'https'
             default_port = "443"
         else:
@@ -1070,7 +1071,7 @@
         # replayed
         ssl_req = self.configbool('web', 'push_ssl', True)
         if ssl_req:
-            if not req.env.get('HTTPS'):
+            if req.env.get('wsgi.url_scheme') != 'https':
                 bail(_('ssl required\n'))
                 return
             proto = 'https'