Mercurial > hg
diff mercurial/hgweb/wsgicgi.py @ 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 | 8fee8ff13d37 |
children | 4dd7b28003d2 |
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)