diff -r 0c231df1ffdc -r b8d0761a85c7 mercurial/wireprotoserver.py --- a/mercurial/wireprotoserver.py Wed Feb 21 14:21:05 2018 -0800 +++ b/mercurial/wireprotoserver.py Wed Feb 21 16:47:39 2018 -0800 @@ -347,12 +347,16 @@ return [data[k] for k in keys] def forwardpayload(self, fpout): + # We initially send an empty response. This tells the client it is + # OK to start sending data. If a client sees any other response, it + # interprets it as an error. + _sshv1respondbytes(self._fout, b'') + # The file is in the form: # # \n # ... # 0\n - _sshv1respondbytes(self._fout, b'') count = int(self._fin.readline()) while count: fpout.write(self._fin.read(count))