diff -r 2cdf47e14c30 -r 1f7d9024674c mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Sat Mar 10 11:03:45 2018 -0800 +++ b/mercurial/hgweb/hgweb_mod.py Sat Mar 10 10:56:10 2018 -0800 @@ -304,7 +304,7 @@ yield r def _runwsgi(self, wsgireq, repo): - req = requestmod.parserequestfromenv(wsgireq.env) + req = wsgireq.req rctx = requestcontext(self, repo) # This state is global across all threads.