gateway: fix car/block responses cached as deserialized ones when ?format=raw|car is missing #606
Labels
dif/expert
Extensive knowledge (implications, ramifications) required
effort/days
Estimated to take multiple days, but less than a week
P1
High: Likely tackled by core team if no one steps up
topic/gateway
Issues related to HTTP Gateway
Problem
/ipfs/cid
can return different bytes based onAccept
header which caused bugs in the past (block response being returned instead of deserialized one etc)Vary: Accept
because we don't want cache key to be different for every blient/browser, we only want it to be different for block/car/ipns-record/tar/(dag-)json|cbor content typesSolution
Ideas
?format=car|raw|foo
withCache-Control: no-cache
when alternative response format is requestedContent-Location: [...]?format=foo
with non-default responseVary: Accept
and pay the penalty of more cache missesPlan
The text was updated successfully, but these errors were encountered: