I'd like to use the ETag returned with the https://admin.fedoraproject.org/pkgdb/api/collections/ to avoid downloading the content when it did not change, but the current state is that whenever I download that URL it changes its ETag header.
Could it be possible to preserver the ETag and change it only if the content of the data also changed?
Test:
$ wget --save-headers --header='If-None-Match: "35be-5cd29f82095e0"' https://admin.fedoraproject.org/pkgdb/api/collections/ -O /tmp/data $ cat /tmp/data | grep -i ETag
I'd like to have returned Not Modified "error" from the server when the ETag I pass in matches the data ETag.
Not Modified
Metadata Update from @kevin: - Issue priority set to: Waiting on Assignee (was: Needs Review) - Issue tagged with: low-gain, low-trouble, ops
https://pagure.io/fedora-infra/ansible/pull-request/836 should fix this.
The problem was that by default ETags use Mtime in the mix, and we distribute this file to a network of proxies, so they all have slightly different mtimes on the file after it's copied.
Switching it to just use Digest and Size should make it consistent accross the proxies.
ok, this should be fixed now.
Please re-open if you still see any issues or something further to change.
% curl --etag-save /tmp/etag https://admin.fedoraproject.org/pkgdb/api/collections/ -o /dev/null % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 13758 100 13758 0 0 34332 0 --:--:-- --:--:-- --:--:-- 34395 % curl --etag-compare /tmp/etag https://admin.fedoraproject.org/pkgdb/api/collections/ %
Metadata Update from @kevin: - Issue close_status updated to: Fixed with Explanation - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.