Skip to content

Extend the `tar` and `zip` source plugins to include `etag` support

When tracking a tar source, store the contents of the ETag response header in an etag field, next to the ref. When tracking, and we have a file on disk already, also use an already present etag value in the If-None-Match request header. Handle HTTP 304 response to mean to use the file we already have on disk. This way we avoid having to download typically large files over and over again. Avoiding that in the case of bst build --track is particularly beneficial.

Example:

...

sources:
- kind: tar
  url: "https://example.com/my_big_tarball.tar.gz"
  ref: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b 
  etag: "adc83b19e793491b1c6ea0fd8b46cd9f32e592fc"
Edited by Tristan Van Berkom
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information