Mercurial > hg
changeset 7406:ee8af8a4d905
hgweb: support broken IIS 5 behavior with .cgi in PATH_INFO
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Tue, 25 Nov 2008 17:54:49 +0100 |
parents | f1944e74e83c |
children | 7b2a77b20964 |
files | mercurial/hgweb/wsgicgi.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/wsgicgi.py Tue Nov 25 22:23:17 2008 +0100 +++ b/mercurial/hgweb/wsgicgi.py Tue Nov 25 17:54:49 2008 +0100 @@ -17,6 +17,9 @@ environ = dict(os.environ.items()) environ.setdefault('PATH_INFO', '') + if '.cgi' in environ['PATH_INFO']: + environ['PATH_INFO'] = environ['PATH_INFO'].split('.cgi', 1)[1] + environ['wsgi.input'] = sys.stdin environ['wsgi.errors'] = sys.stderr environ['wsgi.version'] = (1, 0)