Subject: Re: sftp_read retuning 0 prematurely

Re: sftp_read retuning 0 prematurely

From: Alexander Lamaison <>
Date: Mon, 5 Sep 2011 00:02:35 +0100

On 4 September 2011 18:03, Daniel Stenberg <> wrote:
> On Sun, 4 Sep 2011, Alexander Lamaison wrote:
>> This patch fixes it for me :)
> Good! Then we at least know we're on the right track.
>>> On a second thought, that's too simple and will make a 'gap' in the
>>> file... I'll have to think a while more and provide a better patch soon.
>> You mean where later SFTP_READs were sent out requesting data from the
>> full chunk->len offset onwards?
> Exactly.

The other regression I've discovered is sftp_read blocking with a
buffer over about 20000 bytes on the *second* read. The first time
round it seems to work no matter how big I make the buffer.

It happens ever since the sftp_read was rewritten to use pipelining:
Unfortunately this is a big and complex change making it hard to track
down a cause. I'll keep debugging but any hints would be useful.

This is all on Windows BTW.

Received on 2011-09-05