cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: return codes of curl_easy_getinfo()

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 22 Aug 2007 23:33:55 +0200 (CEST)

On Wed, 22 Aug 2007, Christian Vogt wrote:

> 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() ) and a file size of 0 is returned.
>
> Wouldn't it be good to give an indication to the caller of
> curl_easy_getinfo() whether the requested information is internally
> available or not? In progress.c I've seen that there are a couple of flags
> available that carry that information.

Yes, I think it would be useful for applications to be able to know which of
the cases it is.

Any suggestions on how they could work to make it nice?

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-08-22