Changeset 5e4eea03fa1c…
Parent 1aa8682c760c…
by Andrew Pritchard <andrewp@fogcreek.com>
Changes to one file · Browse files at 5e4eea03fa1c Showing diff from parent 1aa8682c760c Diff from another changeset...
@@ -126,18 +126,17 @@ def capabilities(repo, proto):
return capabilities_orig(repo, proto) + ' largefiles=serve'
+# duplicate what Mercurial's new out-of-band errors mechanism does, because
+# clients old and new alike both handle it well
def webproto_refuseclient(self, message):
- self.req.header([('Content-Type', 'application/octet-stream')])
+ self.req.header([('Content-Type', 'application/hg-error')])
return message
def sshproto_refuseclient(self, message):
- self.ui.write_err('%s\n' % message)
+ self.ui.write_err('%s\n-\n' % message)
+ self.fout.write('\n')
+ self.fout.flush()
- # somehow, this causes the client to realize we've disconnected but still
- # writes the return value
- self.ui.fout.close()
- self.ui.ferr.close()
- self.ui.fin.close()
return ''
def heads(repo, proto):
|
Loading...