-
Notifications
You must be signed in to change notification settings - Fork 64
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
fix: use relative redirects #36
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conceptual approval 👍
src/api/sync.rs
Outdated
) | ||
}; | ||
|
||
// Follow redirects until host does not match if the first host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Follow redirects until host does not match if the first host | |
// Follow redirects until host does not match with the first host |
src/api/sync.rs
Outdated
.get(response.get_url()) | ||
.set(RANGE, "bytes=0-0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you happen to know why the GET range 0-0 instead of a HEAD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because specific DNS routing rules with headers.
Although I'm not 100% sure if it's still needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I was under the impression we didn't need such rules anymore though.
We still need these rules when we get a redirect because of casing issues. |
hi @OlivierDehaene, |
Can you release this fix to crates.io? I'm unable to download some models using it because huggingface URLs are returning redirects in some cases. |
+1, @Narsil (or others) if you could make a release to crates.io, that would be great! Fwiw we get some errors |
Close #33
See internal: https://huggingface.slack.com/archives/C04U4U3UK24/p1700830641390659?thread_ts=1700489513.676129&cid=C04U4U3UK24