cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_easy_perform with CURLOPT_NOBODY = 1 returns 0 when ftp file does not exist.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 30 Sep 2008 11:14:58 +0200 (CEST)

On Mon, 29 Sep 2008, Dan Fandrich wrote:

> Using this program, I found that adding the line
>
> curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
>
> (which the curl command-line client does) in both cases made the two cases
> both behave the same in returning error 19. It looks like the NOBODY case
> ignores the error it gets when sending the SIZE command, but in the FILETIME
> case the MDTM command returns an error which IS passed through to the app.
> Sounds to me like an inconsistency that doesn't have a good reason to be.

I figure a failed SIZE (returning 550 explicitly, since SIZE may not be
supported/working so we cannot assume a "good" response) should cause a
CURLE_REMOTE_FILE_NOT_FOUND unconditionally.

This seems related to KNOWN_BUGS #58, as if SIZE doesn't work (returning
something like 350) I believe libcurl won't return one of those errors anyway.

-- 
  / daniel.haxx.se
Received on 2008-09-30