Skip to content

Support HEAD requests #149

Description

@lidel

Not sure if this is the right repository but trustless responses do not support HEAD method:

$ curl -v "https://dag.w3s.link/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?format=raw" -X HEAD
< HTTP/2 405

Related spec at: https://specs.ipfs.tech/http-gateways/trustless-gateway/#head-ipfs-cid-path-params

This is a bug: without HEAD client is unable to check if gateway has content, and may get it multiple times from different sources, wasting bandwidth.

Any chance to fix this?

This impacts @hsanjuan's HTTP retrieval work in Boxo/Kubo/Rainbow.

If it is technically challenging to generate all HTTP headers, just implement basic "has" check and return status code (200 or 404) – this will be enough to unblock us.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions