# HG changeset patch # User Benoit Boissinot # Date 2010-10-11 17:47:11 # Node ID ca6e2adc3e4deb28830f17fcf43e89cab02aa944 # Parent 40bb5853fc4b338884b4e15c0c92de543f9c1f4c wireproto/http: drain the incoming bundle in case of errors diff --git a/mercurial/hgweb/protocol.py b/mercurial/hgweb/protocol.py --- a/mercurial/hgweb/protocol.py +++ b/mercurial/hgweb/protocol.py @@ -67,6 +67,8 @@ def call(repo, req, cmd): req.respond(HTTP_OK, HGTYPE) return ['%d\n%s' % (rsp.res, val)] elif isinstance(rsp, wireproto.pusherr): + # drain the incoming bundle + req.drain() sys.stdout, sys.stderr = p.oldio rsp = '0\n%s\n' % rsp.res req.respond(HTTP_OK, HGTYPE, length=len(rsp))