cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SFTP fails (Failure when receiving data from the peer)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 19 Sep 2008 13:54:11 +0200 (CEST)

On Thu, 18 Sep 2008, Aleksey Telyshev wrote:

First, this mail is now only sent to curl-library as I already requested we
should leave curl-users with this topic. You need to subscribe to curl-library
first in order to post to it.

Then you top-posted your reply which is against the netiquette for this list
(as it screws up threading and read order).

And thirdly, you didn't address most of my questions.

> After some more investigations I found that this problem can be avoided in
> user program with thiss call:
> curl_easy_setopt(pMyCurlHandle, CURLOPT_BUFFERSIZE, myMaxPackSize);

Yes, if the goal is to make sure libcurl never passes 16K at once to libssh2
then that's a very handy work-around.

> No how this value was defined (16384)?

It needs to be a fairly large buffer to minimize the number of loops and
system calls. Then it was adjusted to this particular value one time in the
past when the previous value proved to cause problems on a particular
operating system.

But it then goes back to the fact that libssh2 is supposed to grok this big
buffers being sent to it, so it not doing so is a libssh2 bug. Don't you agree
with that?

-- 
  / daniel.haxx.se
Received on 2008-09-19