Patchwork D2825: hgweb: replace PATH_INFO with dispatchpath

login
register
mail settings
Submitter phabricator
Date March 12, 2018, 9:38 p.m.
Message ID <0254689b1f291ec5326411f4fdc30f1c@localhost.localdomain>
Download mbox | patch
Permalink /patch/29399/
State Not Applicable
Headers show

Comments

phabricator - March 12, 2018, 9:38 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG803e0fc0cc9a: hgweb: replace PATH_INFO with dispatchpath (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2825?vs=6891&id=6955

REVISION DETAIL
  https://phab.mercurial-scm.org/D2825

AFFECTED FILES
  mercurial/hgweb/hgwebdir_mod.py

CHANGE DETAILS




To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

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 @@ 
                 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)