-
Notifications
You must be signed in to change notification settings - Fork 3
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
Test HEAD requests before GET #104
Comments
Thank you for the suggestion, @hsanjuan. As I understand it, you would like to add a third check to the existing two we have in place:
Is that correct? |
To maintain backward compatibility, it may be better to run the HEAD check only if the retrieval check passes and also to report the outcome of HEAD checks as a new metric distinct from RSR. |
Yes, that'd work. Thanks! |
Added as a candidate to CheckerNetwork/roadmap#219 |
@hsanjuan is a 3xx also a success for this HEAD request, or only a 2xx? |
Which 3xx ? I'm guessing a redirection should be followed until the final location is tested... |
Good question, redirects will be followed, the HTTP response code of the final response will be reported. Then only 2xx makes sense. |
The Trustless Gateway Spec requires supporting HEAD requests.
I have observed providers with HTTP-endpoint that return 500 on HEAD requests, while returning content with GET requests for the same URL.
It is important that HEAD requests are supported as it allows opportunistic content discovery without causing unnecessary load on the providers.
For example, in general we can use HEAD to test if multiple providers have the content they are announcing. We can then use GET to fetch according to latency measurements, or any scoring mechanism.
In the context of Spark, we can expand tests by checking the presence of many more CIDs and randomly picking which ones to fully retrieve.
The text was updated successfully, but these errors were encountered: