Subject: Re: sftp_read retuning 0 prematurely

Re: sftp_read retuning 0 prematurely

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 5 Sep 2011 09:22:26 +0200 (CEST)

On Mon, 5 Sep 2011, Alexander Lamaison wrote:

> I was mistaken. If the initial buffer is 3970000 bytes, it succeeds one the
> first read and blocks on the second. If the initial buffer is 3970001 it
> blocks and the first read.

Hm. That's a very large buffer. I wonder if we perhaps should do something in
sftp_read() to set a cap on how much read-ahead it can do when a very large
buffer is passed in.

I think liuzl might be right that it can be a window-size related problem
since most SSH servers will not provide a 3970000 * 4 window.

It would be useful to get more feedback on his patch so that we can get that
applied before we put the next release together.

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-09-05