cURL / Mailing Lists / curl-library / Single Mail


Re: curl check for file with TFTP

From: Daniel Stenberg <>
Date: Thu, 9 Apr 2009 00:12:01 +0200 (CEST)

On Wed, 8 Apr 2009, Guenter wrote:

> curl -I ; echo "Status: $?"
> HTTP/1.1 404 Not Found
> Status: 0

> curl -I ; echo "Status: $?"
> curl: (19) Given file does not exist
> Status: 19

Yeah, it's somewhat inconsistent but I think HTTP(S) stands out a bit compared
to the other protocols and that is the only protocol libcurl treats
differently in this aspect I believe.

At least I think I've always viewed HTTP as different due to the way even 4xx
responses etc look exactly the same as a 2xx response so that to libcurl
there's no difference in treatment. To compare with with FTP or TFTP, we have
to act quite differently when they fail their file retrieval compared to when
they don't.

And at this point, we of course need to carefully consider things if we'd be
changing any such behavior, as we have lots of apps and systems built up
around the existing way...

Received on 2009-04-09