Tarball 304s are missing Etag header

As an example:

curl -vo /dev/null -H 'If-None-Match: "96350991c749f73ca1703498711e1584261a2f86b8a5c24fa710bbd108b5bef1"' https://codeload.github.com/LnL7/nix-darwin/tar.gz/6bd5208e7ffd141f2b2c4bd639e11ca5b96aec8c

This should contain an Etag header in its output, but it doesn’t. According to the HTTP spec (RFC 2616):

10.3.5 304 Not Modified
The response MUST include the following header fields:

  • ETag and/or Content-Location, if the header would have been sent in a 200 response to the same request

This led to etag assertions · Issue #4469 · NixOS/nix · GitHub. Nix now has a workaround for this, but I can’t find any evidence of this issue being reported to GitHub in the meantime.