--etag-save overwrites on status 304

Paul Gilmartin via curl-users <[email protected]>
Newsgroups gmane.comp.web.curl.general
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.