# HG changeset patch # User Gregory Szorc # Date 2018-03-11 22:18:29 # Node ID 803e0fc0cc9aee0a5fd5726551e932e225fe8494 # Parent e473a032f38a69c45b4676c07aaa3c4f55a3bdef 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 diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -369,7 +369,7 @@ class hgwebdir(object): 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)