Re: Naming ETag files?
Dan Fandrich via curl-users <[email protected]>
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Jan 15, 2023 at 11:04:20AM -0700, Paul Gilmartin via curl-users wrote: > Interesting. The Mac and Linux xattr commands have a useful compatible > overlap. So I could download with: > --etag-save tempfile.ETag > tnen: > xattr -w user.aETag "$( cat tempfile.ETag )" downloaded-resource > > ... and reverse the process for --etag-compare for the next conditional > download. But, ETags are unique to the server (or possibly the URL) so just saving the ETag isn't enough. You'd have to also store the URL where it came from as well, and only use the associated ETag if the server/URL matches on the next request. curl actually save the URL already given the --xattr option. Dan -- Unsubscribe: https://lists.haxx.se/listinfo/curl-users Etiquette: https://curl.se/mail/etiquette.html