The test is:
GET UnixFS with format=json (not dag-json) is no-op (no conversion)
The spec says of the format parameter:
This is a URL-friendly alternative to sending an Accept header.
The spec says of the Accept header:
application/json – same as application/vnd.ipld.dag-json, unless the CID's codec already is json (0x0200).
The spec says of application/vnd.ipld.dag-json
application/vnd.ipld.dag-json – requests IPLD Data Model representation serialized into DAG-JSON format. If the requested CID already has dag-json (0x0129) codec, data is validated as DAG-JSON before being returned as-is. Invalid DAG-JSON produces HTTP Error 500.
The CID is bafkreialihlqnf5uwo4byh4n3cmwlntwqzxxs2fg5vanqdi3d7tb2l5xkm, a RAW codec CID, so from the test description it seems like the raw block data should be returned with the application/json content type as requested by the client and let them figure it out.
If you do that the test fails as it wants the gateway to ignore the format=json param and return text/plain, which is not what the client says they support or what the spec says to do?
The test is:
GET UnixFS with format=json (not dag-json) is no-op (no conversion)The spec says of the format parameter:
The spec says of the Accept header:
The spec says of
application/vnd.ipld.dag-jsonThe CID is
bafkreialihlqnf5uwo4byh4n3cmwlntwqzxxs2fg5vanqdi3d7tb2l5xkm, a RAW codec CID, so from the test description it seems like the raw block data should be returned with theapplication/jsoncontent type as requested by the client and let them figure it out.If you do that the test fails as it wants the gateway to ignore the
format=jsonparam and returntext/plain, which is not what the client says they support or what the spec says to do?