diff mercurial/hgweb/wsgicgi.py @ 5579:e15f7db0f0ee

Use SCRIPT_NAME and PATH_INFO instead of REQUEST_URI. This is required by WSGI (fixes issue846).
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Sat, 01 Dec 2007 19:19:08 +0100
parents e0173902c813
children f429e0e067a8
line wrap: on
line diff
--- a/mercurial/hgweb/wsgicgi.py	Sat Dec 01 19:10:00 2007 +0100
+++ b/mercurial/hgweb/wsgicgi.py	Sat Dec 01 19:19:08 2007 +0100
@@ -16,6 +16,9 @@
     util.set_binary(sys.stdout)
 
     environ = dict(os.environ.items())
+    if 'PATH_INFO' not in environ:
+    	environ['PATH_INFO'] = ''
+
     environ['wsgi.input'] = sys.stdin
     environ['wsgi.errors'] = sys.stderr
     environ['wsgi.version'] = (1, 0)