# HG changeset patch # User Wesley J. Landaker # Date 2007-07-12 19:55:20 # Node ID be591b740e0fc4e6f61be673240f56e3aba4c31b # Parent 192cd95c2ba833805c8c762a6da14571eeb663c0 Handle CGI SSL detection via HTTPS environment better. Some servers send on/off, 0/1, yes/no, and may be upper or lower case. This fix will handle all of those permutations. It was inspired by the detection done in in some other wsgi python web applications I looked at. diff --git a/mercurial/hgweb/wsgicgi.py b/mercurial/hgweb/wsgicgi.py --- a/mercurial/hgweb/wsgicgi.py +++ b/mercurial/hgweb/wsgicgi.py @@ -23,7 +23,7 @@ def launch(application): environ['wsgi.multiprocess'] = True environ['wsgi.run_once'] = True - if environ.get('HTTPS','off') in ('on','1'): + if environ.get('HTTPS','off').lower() in ('on','1','yes'): environ['wsgi.url_scheme'] = 'https' else: environ['wsgi.url_scheme'] = 'http'