hgweb: replace PATH_INFO with dispatchpath
This was the last consumer of wsgireq.env from our WSGI applications!
(Although indirect consumers of this attribute exist in
wsgirequest.respond().)
Differential Revision: https://phab.mercurial-scm.org/D2825
--- a/mercurial/hgweb/hgwebdir_mod.py Sun Mar 11 15:15:02 2018 -0700
+++ b/mercurial/hgweb/hgwebdir_mod.py Sun Mar 11 15:18:29 2018 -0700
@@ -369,7 +369,7 @@
res.headers['Content-Security-Policy'] = csp
wsgireq.headers.append(('Content-Security-Policy', csp))
- virtual = wsgireq.env.get("PATH_INFO", "").strip('/')
+ virtual = req.dispatchpath.strip('/')
tmpl = self.templater(wsgireq, nonce)
ctype = tmpl('mimetype', encoding=encoding.encoding)
ctype = templater.stringify(ctype)