##// END OF EJS Templates
Use wsgi.url_scheme instead of ad-hoc CGI checks....
Wesley J. Landaker -
r4872:419a6f71 default
parent child Browse files
Show More
@@ -787,7 +787,8 b' class hgweb(object):'
787 787 style = req.form['style'][0]
788 788 mapfile = style_map(self.templatepath, style)
789 789
790 if req.env.get('HTTPS'):
790 proto = req.env.get('wsgi.url_scheme')
791 if proto == 'https':
791 792 proto = 'https'
792 793 default_port = "443"
793 794 else:
@@ -1070,7 +1071,7 b' class hgweb(object):'
1070 1071 # replayed
1071 1072 ssl_req = self.configbool('web', 'push_ssl', True)
1072 1073 if ssl_req:
1073 if not req.env.get('HTTPS'):
1074 if req.env.get('wsgi.url_scheme') != 'https':
1074 1075 bail(_('ssl required\n'))
1075 1076 return
1076 1077 proto = 'https'
General Comments 0
You need to be logged in to leave comments. Login now