cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: detect if an upload/download is finished or failed

From: Roth, Kevin P. <KPRoth_at_MAPLLC.com>
Date: Mon, 29 Dec 2003 15:20:55 -0500

Are you sure about that?

I just tried this:

> curl.exe http://nonexistanturl.com
 curl: (6) Couldn't resolve host 'nonexistanturl.com'

> echo %ERRORLEVEL%
 6

and if you look close you'll see the errorlevel output afterwards.

It is true that HTTP level errors (such as a 500 server error) won't automatically come back in the command-line return code (errorlevel), but I think the --fail command-line option will enable that behavior for you.

If you're going to redirect stderr, you might consider turning off the progress bar (-s -S will do the trick nicely).

- Kevin

-----Original Message-----
From: Sebastien WILLEMIJNS
Sent: Monday, December 29, 2003 10:26 AM

CURL doesn't inplement in win32 versions the "errorlevel" notion so
it is very hard to know if a transfert is OK or failed... except
if I redirect the screen with "STDERR" option of CURL but
i can not see the progress bar ,)

is it possible to create a log file after every transfer ?

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op%cck
Received on 2003-12-29