Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

Open
2color opened this issue Oct 2, 2024 · 1 comment
Open

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

2color opened this issue Oct 2, 2024 · 1 comment

Comments

@2color
Copy link

2color commented Oct 2, 2024

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.

@rvagg
Copy link
Member

rvagg commented Oct 3, 2024

👍 that would be pretty easy to implement I expect

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

No branches or pull requests

2 participants