You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
Should we maybe cache this (per-run) so that we remember what hosts reject HEAD but accept GET? It would keep us from making a lot of unnecessary failed requests when we have to download a large dataset .
@pmrowla, I am not sure we want to do that. From our point of view, URL host might be completely different than the one actually forbidding the HEAD request.
Example from the original issue: dvc get-url https://github.com/explosion/spacy-models/releases/download/ro_core_news_sm-2.3.1/ro_core_news_sm-2.3.1.tar.gz
From our point of view, it will be github.com that forbids HEAD. Inspecting the response shows that it is actually github-production-release-asset-2e65be.s3.amazonaws.com that forbids that. And its fine, we can inspect the response and cache the github-production-release-asset-2e65be.s3.amazonaws.com as the reason, but the problem is that next time we call even the same link, we still need to make HEAD request (because github.com is not cached) just to know that it actually redirects to github-production-release-asset-2e65be.s3.amazonaws.com and that we should use GET instead of HEAD. We end up still doing 2 requests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
❗ I have followed the Contributing to DVC checklist.
📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏
Fixes #4131