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.
--- a/mercurial/hgweb/wsgicgi.py Wed Jul 11 20:15:03 2007 -0300
+++ b/mercurial/hgweb/wsgicgi.py Thu Jul 12 13:55:20 2007 -0600
@@ -23,7 +23,7 @@
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'