Skip to content

Add support for only-if-cached HEAD behavior #151

@2color

Description

@2color

Background

When testing providers coming from the IPNI, it's useful to be able to check if they have a block without requesting the bytes.

In the IPFS HTTP Gateway Spec this is specified as follows:

1.2.1 only-if-cached HEAD behavior
HTTP client can send HEAD request with Cache-Control: only-if-cached to disable IPFS data transfer and inexpensively probe if the gateway has the data cached.

Implementation MUST ensure that handling only-if-cached HEAD response is fast and does not generate any additional I/O such as IPFS data transfer. This allows light clients to probe and prioritize gateways which already have the data.

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