diff -r 871c77e78f5d -r f4522df38c65 mercurial/hgweb/protocol.py --- a/mercurial/hgweb/protocol.py Wed Aug 03 16:41:14 2011 -0500 +++ b/mercurial/hgweb/protocol.py Tue Aug 02 15:21:10 2011 -0400 @@ -10,6 +10,7 @@ from common import HTTP_OK HGTYPE = 'application/mercurial-0.1' +HGERRTYPE = 'application/hg-error' class webproto(object): def __init__(self, req, ui): @@ -90,3 +91,7 @@ rsp = '0\n%s\n' % rsp.res req.respond(HTTP_OK, HGTYPE, length=len(rsp)) return [rsp] + elif isinstance(rsp, wireproto.ooberror): + rsp = rsp.message + req.respond(HTTP_OK, HGERRTYPE, length=len(rsp)) + return [rsp]