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.

curl and etag usage (--etag-save and --etag-compare)?

From: jacques granduel via curl-users <curl-users_at_lists.haxx.se>
Date: Sun, 6 Mar 2022 13:29:46 +0100

 Hi Curl Community,

and this was another question about etag usage posted on StackOverFlow
<https://stackoverflow.com/questions/71244361/curl-and-etag-usage-etag-save-and-etag-compare>
without any answer.
I reproduce the question hereafter:

Somehow related to how-to-use-curl-z-parallel-effectively
<https://stackoverflow.com/questions/71244217/how-to-use-curl-z-parallel-effectively>,
I need to download thousands of documents, but the server manages *etags*.
As of version curl-7.68, curl has 2 options for dealing with etags (--etag-save
<file> and --etag-compare <file>). So etags can be saved for later
comparisons. But it seems that the only built way is to use an etag file
per downloaded file, which is cumbersome. Is there a way to pass only the
etag value? or a key-value file with all etags? Should I resort to -H
'If-None-Match: <etag>' as described curl-and-etag-usage
<https://stackoverflow.com/questions/9920018/curl-and-etag-usage>?

What's the best way to use --etag-save/--etag-compare with thousands
downloads?

Thanks again. Best regards.
jgran


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-03-06