cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl --fail and exit code 22

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 18 Mar 2003 10:15:53 +0100 (CET)

On Tue, 18 Mar 2003, Dale Clapperton wrote:

> I believe I've found a bug (or an undocumented feature) in curl, which
> affects at least versions 7.9.7 and 7.10.2
>
> When using curl with the --fail option to fetch a webpage that results in a
> 401 Authorization Required error, curl exits with code 22 which according
> to the man page should correspond to a 404 Not Found error.

Thanks for pointing this out. It is actually an error in the documentation,
as --fail will return 22 for any HTTP error that is 400 or above.

I'll go and update the docs right now!

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
Received on 2003-03-18