Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support HEAD requests #149

Open
lidel opened this issue Jan 29, 2025 · 0 comments
Open

Support HEAD requests #149

lidel opened this issue Jan 29, 2025 · 0 comments

Comments

@lidel
Copy link

lidel commented Jan 29, 2025

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant