curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

--etag-save overwrites on status 304

From: Paul Gilmartin via curl-users <curl-users_at_lists.haxx.se>
Date: Mon, 2 Oct 2023 11:17:43 -0600

I have been in the habit of using the same file as --etag-save
and --etag-compare. This sort of works. However, in case of
HTTP/1.1 304 Not Modified my --etag-compare is overwritt4n by
an empty file and is ineffective for the next fetch.

I have started making my --etag-save a temp file and renaming
it only on success. Is this the best approach?

Would it be better if curl wrote to --etag-save only if an
ETag: header appears, or do some users depend on the current
behavior?

-- 
Thanks,
gil
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-10-02