-
Notifications
You must be signed in to change notification settings - Fork 641
Wrong redirect URL given for a download with -/_ canonicalization #1687
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
Comments
Given that |
smarnach
added a commit
to smarnach/crates.io
that referenced
this issue
Jun 4, 2019
Fixes rust-lang#1687. Crates are uploaded to S3 under the name they were first published as, but the download endpoint always uses the name as written in the request. If these names differ in their use of dashes vs. underscores, the download endpoint returns an invalid link. This fix changes the database request that updates the download count to also return the original crate name.
bors
added a commit
that referenced
this issue
Jun 10, 2019
Return correct download link for requests for non-standard crate names. Fixes #1687. Crates are uploaded to S3 under the name they were first published as, but the download endpoint always uses the name as written in the request. If these names differ in their use of dashes vs. underscores, the download endpoint returns an invalid link. To avoid adding another database request for every single crate download, this fix changes the database request that updates the download count to also return the original crate name. We will need to confirm that the performance impact of this change is negligible.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was poking around today at a crate I was working on and was confused that after publishing I was getting a 403 for the tarball for the crate that I wanted to manually inspect. I typed out everything below manually so the bug is definitely on me (not through Cargo or any tooling or anything like that), but figured it was still worth mentioning!
Specifically I was interested in the
compiler_builtins
crate and forgot whether it was_
or-
so I typed out:but that gave me some error about it not being gzip. Next I ran
curl -I
and it prints out:turns out this URL doesn't exist! It should actually be:
Is this intended to work? If not that's totally fine, but I figure if it was intended to work may be good to know!
The text was updated successfully, but these errors were encountered: