cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Stating remote files

From: Rafael Fernández López <ereslibre_at_gmail.com>
Date: Wed, 3 Jun 2009 16:06:24 +0200

Hi,

> The problem - I believe - is that we cannot use the response code from SIZE
> to determine of the file is present or not.

Despite I am not aware of the libcurl internals, I understand the reasoning.
Could it be checked if SIZE returned -1 from the server, or is this also
reserved for "the server does not want to tell us the size, or cannot
determine it" ?

If the SIZE set to -1 have different meanings (inexistence, unable to get
size [permissions or other reasons], or even others) then yes, we are stuck.

However, I think this could be explicitly explained in the libcurl
documentation, so more people won't hit the same problem.

Regards,
Rafael Fernández López.
Received on 2009-06-03