mercurial/hgweb/protocol.py
changeset 15017 f4522df38c65
parent 14614 afccc64eea73
child 18346 6c2563b2c1c6
--- 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]