diff -r d7fd203e36cc -r d0b0fedbfb53 mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Sun Mar 11 13:11:13 2018 -0700 +++ b/mercurial/hgweb/hgweb_mod.py Sun Mar 11 13:38:56 2018 -0700 @@ -324,7 +324,11 @@ if handled: return res.sendresponse() - if req.havepathinfo: + # Old implementations of hgweb supported dispatching the request via + # the initial query string parameter instead of using PATH_INFO. + # If PATH_INFO is present (signaled by ``req.dispatchpath`` having + # a value), we use it. Otherwise fall back to the query string. + if req.dispatchpath is not None: query = req.dispatchpath else: query = req.querystring.partition('&')[0].partition(';')[0]