Skip to content

fix: use relative redirects#36

Merged
OlivierDehaene merged 2 commits into
mainfrom
fix/redirect
Nov 24, 2023
Merged

fix: use relative redirects#36
OlivierDehaene merged 2 commits into
mainfrom
fix/redirect

Conversation

@OlivierDehaene

Copy link
Copy Markdown
Contributor

@Wauplin Wauplin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conceptual approval 👍

Comment thread src/api/sync.rs Outdated
)
};

// Follow redirects until host does not match if the first host

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Follow redirects until host does not match if the first host
// Follow redirects until host does not match with the first host

Comment thread src/api/sync.rs Outdated
Comment on lines +301 to +302
.get(response.get_url())
.set(RANGE, "bytes=0-0")

Copy link
Copy Markdown

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?

Copy link
Copy Markdown
Contributor

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.

@Narsil Narsil left a comment

Copy link
Copy Markdown
Contributor

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.

@OlivierDehaene

OlivierDehaene commented Nov 24, 2023

Copy link
Copy Markdown
Contributor Author

We still need these rules when we get a redirect because of casing issues.
I added a test for this specific problem

@OlivierDehaene OlivierDehaene merged commit b167f69 into main Nov 24, 2023
@jtsai-quid

Copy link
Copy Markdown

hi @OlivierDehaene,
Is there an expected date for the next release?
Many thanks

@zackangelo

Copy link
Copy Markdown

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.

@LaurentMazare

Copy link
Copy Markdown
Collaborator

+1, @Narsil (or others) if you could make a release to crates.io, that would be great! Fwiw we get some errors Error: Header etag is missing on the llama-3.1 repos.

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

Successfully merging this pull request may close these issues.

Missing etag downloading TheBloke/Llama-2-7b-Chat-GGUF + llama-2-7b-chat.Q4_K_M.gguf (Tokio)

7 participants