wsgicgi: switch the default PATH_INFO back to str stable
authorMatt Harbison <matt_harbison@yahoo.com>
Fri, 12 Mar 2021 20:19:12 -0500
branchstable
changeset 46702 56483ab91e66
parent 46701 c6d9948e865f
child 46703 ca69e29a2a30
wsgicgi: switch the default PATH_INFO back to str It looks like everything here is meant to be str, and regressed in 687b865b95ad. Pytype didn't flag this, but is really confused about the range of possible types for the dictionary values, and flagged missing `lower()` on various types in this area. Differential Revision: https://phab.mercurial-scm.org/D10204
mercurial/hgweb/wsgicgi.py
--- a/mercurial/hgweb/wsgicgi.py	Fri Mar 12 18:55:06 2021 -0500
+++ b/mercurial/hgweb/wsgicgi.py	Fri Mar 12 20:19:12 2021 -0500
@@ -25,7 +25,7 @@
     procutil.setbinary(procutil.stdout)
 
     environ = dict(pycompat.iteritems(os.environ))  # re-exports
-    environ.setdefault('PATH_INFO', b'')
+    environ.setdefault('PATH_INFO', '')
     if environ.get('SERVER_SOFTWARE', '').startswith('Microsoft-IIS'):
         # IIS includes script_name in PATH_INFO
         scriptname = environ['SCRIPT_NAME']