cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: status 22 for "not modified" file downloads

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 16 Oct 2001 10:16:26 +0200 (MET DST)

On Mon, 15 Oct 2001, Stephen Welker wrote:

> I may have discovered a problem with cURL v7.9 (& v7.7.1).
>
> cURL appears to report incorrectly the status of a file download when the
> file has NOT been modified since last download.
>
> cURL invocation as follows...
>
> curl --fail \
> --silent \
> --show-error \
> --max-time 180 \
> --time-cond $RECEIVE_FILE \
> --output $RECEIVE_FILE \
> $URL

Hm, this is a problem that happens because you have both --fail and
--time-cond specified. The return code (304) that the server replies when the
document isn't changed is treated as an error by the --fail code...

> Should cURL indicate some other return status other than 22?

I'm not really sure what kind of return code we want here. You didn't
actually get any web page, that can indeed be seen as an error...

What did you expect it to do?

(And thanks for reporting!)

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-10-16