libostree: Add support for ETag and Last-Modified headers
authorPhilip Withnall <pwithnall@endlessos.org>
Thu, 24 Sep 2020 16:49:48 +0000 (17:49 +0100)
committerPhilip Withnall <pwithnall@endlessos.org>
Thu, 22 Oct 2020 20:03:34 +0000 (21:03 +0100)
commit407c683524bb362cbc39b8445015e4b06e5296a5
treec6ac0bcc132862e8cab9277b2cb184d16c53e264
parent9f98aa922329757a538a4e76394779c2d5a24f23
libostree: Add support for ETag and Last-Modified headers

Add support in the soup and curl fetchers to send the `If-None-Match`
and `If-Modified-Since` request headers, and pass on the `ETag` and
`Last-Modified` response headers.

This currently introduces no functional changes, but once call sites
provide the appropriate integration, this will allow HTTP caching to
happen with requests (typically with metadata requests, where the data
is not immutable due to being content-addressed). That should reduce
bandwidth requirements.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
src/libostree/ostree-fetcher-curl.c
src/libostree/ostree-fetcher-soup.c
src/libostree/ostree-fetcher-util.c
src/libostree/ostree-fetcher-util.h
src/libostree/ostree-fetcher.h
src/libostree/ostree-metalink.c
src/libostree/ostree-repo-pull.c