ipfs/specs

Document `Cache-Control` handling for inline CIDs

Winterhuman opened this issue · 1 comments

The spec docs for Cache-Control: only-if-cached (See ipfs/kubo#9082) don't mention how gateways should handle requests with inline CIDs (whether they should be treated as any other CID, or separately to other CIDs).

Right now, gateways respond with a miss on the initial request, but also, they seem to respond with HTTP/2 200 as well? (I'm pretty sure this is affecting newer gateways as I don't think I saw HTTP/2 412 in the Curl requests once)

lidel commented

Identity CID is logically the same state as if block was in local datastore – gateway can respond without doing any p2p.
There is no need to special-case CIDs based on their hash type. The miss you described is explained in ipfs/kubo#9512 (comment)