curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support. 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 Daniel himself.

Re: [RFE] Improve etag handling with --etag-compare-update

From: Aleksei via curl-users <curl-users_at_lists.haxx.se>
Date: Tue, 29 Apr 2025 10:22:00 +0300

On 2025-04-29, Daniel Stenberg wrote:
>On Tue, 29 Apr 2025, Aleksei wrote:
>
>curl --etag-compare file0.etag --etag-save file0.etag $URL
>
>... which only downloads the URL again if it is different than the
>last download.
>
>>If they work together in a single invocation then great, no enhancement
>>needed. Man page describes ETag usage in separate requests:
>>
>> Use the option --etag-save to first save the ETag from a response, and
>> then use this option to compare against the saved ETag in a
>> **subsequent request**.
>
>It saves the etag from this transfer for the purpose of using in the
>next command line.
>
>The compare option however uses the existing file contents for *this*
>command line.
>--
> / daniel.haxx.se || https://rock-solid.curl.dev

Thanks for explanations Daniel, all clear now. Perhaps these things
should be mentioned in the man page, the current --etag-save and
--etag-compare sections gave me a clear impression these options are to
be used in separate curl invocations.
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2025-04-29