Skip to content

Test specifies a format param but requires the server to ignore it? #256

@achingbrain

Description

@achingbrain

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions