curl-library
Re: SFTP fails (Failure when receiving data from the peer)
Date: Wed, 10 Dec 2008 19:57:36 -0000
I am using curl 7.19.2 with libssh2 2.0.18 and see the same issue as
described below (e.g recv returns -1) and I can't download a file with sftp.
So, basically it isn't usable as it works sometimes and sometimes it
doesn't.
What is the solution to this problem ? Do I need a snapshot libssh2 and a
curl fix ?
Thank you
Markus
"Daniel Stenberg" <daniel_at_haxx.se> wrote in message
news:alpine.LRH.1.10.0809191145210.8397_at_yvahk3.pbagnpgbe.fr...
> 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-12-10