Mercurial > hg-stable
changeset 4869:be591b740e0f
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.
author | Wesley J. Landaker <wjl@icecavern.net> |
---|---|
date | Thu, 12 Jul 2007 13:55:20 -0600 |
parents | 192cd95c2ba8 |
children | 8f430b1b3025 |
files | mercurial/hgweb/wsgicgi.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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'