curl-library
Re: return codes of curl_easy_getinfo()
From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Wed, 22 Aug 2007 13:24:11 -0500
Date: Wed, 22 Aug 2007 13:24:11 -0500
> Therefore I use the CURLOPT_NOBODY option and ask for the
> CURLINFO_CONTENT_LENGTH_DOWNLOAD after the call to curl_easy_perform().
>
> Now it turned out that this way, I can't distinguish between
> a.) a file that is not present on the server, and
> b.) a file that is there but has a size of 0 bytes.
>
> In either case everything went well ( CURLE_OK from both
> curl_easy_perform() and curl_easy_getinfo() )
Do you also check CURLINFO_RESPONSE_CODE ?
- Jeff
Received on 2007-08-22