--- a/mercurial/hgweb/webcommands.py Sat Mar 10 16:27:01 2018 -0800
+++ b/mercurial/hgweb/webcommands.py Sat Mar 10 16:17:51 2018 -0800
@@ -24,6 +24,9 @@
paritygen,
staticfile,
)
+from . import (
+ request as requestmod,
+)
from .. import (
archival,
@@ -1215,7 +1218,9 @@
req.headers.extend(headers)
req.respond(HTTP_OK, mimetype)
- archival.archive(web.repo, req, cnode, artype, prefix=name,
+ bodyfh = requestmod.offsettrackingwriter(req.write)
+
+ archival.archive(web.repo, bodyfh, cnode, artype, prefix=name,
matchfn=match,
subrepos=web.configbool("web", "archivesubrepos"))
return []