curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: How to do optimal FTP upload for multiple files?

From: Taras Kushnir via curl-library <>
Date: Thu, 25 Jul 2019 16:25:33 +0000

Resume code originates from

On Jul 25, 2019, at 08:55, Daniel Stenberg <<>> wrote:

On Wed, 24 Jul 2019, Taras Kushnir wrote:

I disabled UPLOAD_BUFFERSIZE and after upgrade 3 different users reported that now they upload without issues (libcurl 7.65.3).

That certainly indicates we have a bug in there somewhere...

The thing is that libcurl uploads whole file (confirmed by parsing Content-Length from), however, it times out and then it tries to resume transfer, however, 100% of the file is transferred.

Are you sure this is actually libcurl that tries to resume? I can't recall that we have code that does this.

Do you have any recommendations?

Is it safe to hack it in a way if we confirm 100% is transferred by parsing content-length, but no server confirmation (226, if I’m not mistaken), is it still safe to consider it as “done” or not really? Under typical circumstances it would not, but just within given context, when for some reason we time out after.

This is probably the same control connection time-out I've already spoken of. When the transfer takes time, some networks will have killed the control connection by the time the transfer is done and then libcurl will get a time-out on that one.

If that's a situation you can detect and then ignore, then it is up to you to do that.


/<> | Get the best commercial curl support there is - from me
                 | Private help, bug fixes, support, ports, new features

Received on 2019-07-25