-
Notifications
You must be signed in to change notification settings - Fork 456
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 download from private renamed repo #1999
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.
LGTM!
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.
Awesome!
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
Nice!
Thanks everyone for the quick review! |
(failing tests are unrelated, closing this PR) |
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.
Agree with the fix
This PR fixes a bug when trying to download a regular file (non-LFS) from a private renamed repo. The problem came from the fact that:
authorization
header since the URL is supposed to be signedauthorization
header was not there + the url is not signed because it is still a relative redirect to huggingface.co=> this PR fixes this issue by keeping the
authorization
header when the redirected URL is from the same domaincc @LysandreJik @osanseviero who investigated the bug
cc @coyotte508 @XciD can you please review this PR as well? Just want to make sure I did not break anything (especially when downloading from a Space)