curl-library
Re: Stating remote files
Date: Wed, 3 Jun 2009 23:09:52 +0200 (CEST)
On Wed, 3 Jun 2009, Rafael Fernández López wrote:
>> 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" ?
There is no known safe response code from SIZE that we can use to determine a
file's presence.
> However, I think this could be explicitly explained in the libcurl
> documentation, so more people won't hit the same problem.
Feel free to suggest where/how that would be mentioned! Where would you have
looked?
-- / daniel.haxx.seReceived on 2009-06-03