cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Timeout and multiple upload

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 2 Jun 2012 17:58:55 +0200 (CEST)

On Thu, 31 May 2012, Hagimeno wrote:

> set shellScript_1 to "/usr/bin/curl --connect-timeout 30 -m 240 " & ftpMode
> & "--ftp-create-dirs -T " & filesList & " -u " & ftpUser & ":" & ftpPwd & "
> " & "ftp://" & ftpHost & ftpDir & folderName & "/"
>
> in the quoted array fileList if I have 300 files curl wait 30 seconds for
> each file and return the final error only at the end of 30*300=9000 seconds.
>
> Because the upload session is composed by 300/400 files, I would like that
> curl return error immediately if one of the upload fails.

Sorry, curl currently has no such option. I know others have mentioned similar
ideas in the past, but as of now curl will attempt to do all operations you
ask in the command line.

> I would like to have error if curl can't connect to the server. Reading the
> manual the connection to the server should be executed only one time.

Yes, if possible. But it will re-attempt for each given URL..

> This should be resolved by "--connect-timeout 30" but probably curl do this
> for each file to upload.

Exactly. You're basically asking for a --exit-at-first-fail or something I
guess...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-06-02