--- a/mercurial/hgweb/hgweb_mod.py Wed Jan 31 16:43:46 2018 -0800
+++ b/mercurial/hgweb/hgweb_mod.py Wed Jan 31 17:34:45 2018 -0800
@@ -369,18 +369,7 @@
if cmd in perms:
self.check_perm(rctx, req, perms[cmd])
except ErrorResponse as inst:
- # A client that sends unbundle without 100-continue will
- # break if we respond early.
- if (cmd == 'unbundle' and
- (req.env.get('HTTP_EXPECT',
- '').lower() != '100-continue') or
- req.env.get('X-HgHttp2', '')):
- req.drain()
- else:
- req.headers.append((r'Connection', r'Close'))
- req.respond(inst, wireprotoserver.HGTYPE,
- body='0\n%s\n' % inst)
- return ''
+ return protohandler['handleerror'](inst)
return protohandler['dispatch']()