--- a/mercurial/hgweb/hgwebdir_mod.py Wed Apr 25 00:26:49 2018 +0530
+++ b/mercurial/hgweb/hgwebdir_mod.py Tue Apr 24 13:55:25 2018 -0700
@@ -428,7 +428,10 @@
uenv.iteritems()}
req = requestmod.parserequestfromenv(
uenv, reponame=virtualrepo,
- altbaseurl=self.ui.config('web', 'baseurl'))
+ altbaseurl=self.ui.config('web', 'baseurl'),
+ # Reuse wrapped body file object otherwise state
+ # tracking can get confused.
+ bodyfh=req.bodyfh)
try:
# ensure caller gets private copy of ui
repo = hg.repository(self.ui.copy(), real)