Skip to content
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

Crates.io crate download API is redirecting to invalid URL #6850

Closed
lucacasonato opened this issue Jul 20, 2023 · 10 comments · Fixed by #6851
Closed

Crates.io crate download API is redirecting to invalid URL #6850

lucacasonato opened this issue Jul 20, 2023 · 10 comments · Fixed by #6851
Labels
A-backend ⚙️ C-bug 🐞 Category: unintended, undesired behavior

Comments

@lucacasonato
Copy link

Current Behavior

https://crates.io/api/v1/crates/smallvec/1.10.0/download is redirecting to https://static.crates.iocrates/smallvec/smallvec-1.10.0.crate

Expected Behavior

https://crates.io/api/v1/crates/smallvec/1.10.0/download should redirect to https://static.crates.io/crates/smallvec/smallvec-1.10.0.crate

Steps To Reproduce

$ curl -i https://crates.io/api/v1/crates/smallvec/1.10.0/download
HTTP/2 302 
content-length: 0
location: https://static.crates.iocrates/smallvec/smallvec-1.10.0.crate
server: nginx
date: Thu, 20 Jul 2023 12:23:43 GMT
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 0
content-security-policy: default-src 'self'; connect-src 'self' *.ingest.sentry.io https://docs.rs https://play.rust-lang.org https://static.crates.io; script-src 'self' 'unsafe-eval' 'sha256-n1+BB7Ckjcal1Pr7QNBh/dKRTtBQsIytFodRiIosXdE='; style-src 'self' 'unsafe-inline' https://code.cdn.mozilla.net; font-src https://code.cdn.mozilla.net; img-src *; object-src 'none'
access-control-allow-origin: *
strict-transport-security: max-age=31536000; includeSubDomains
via: 1.1 vegur, 1.1 6851e5f468b237438eae4078fbc9d3b8.cloudfront.net (CloudFront)
vary: Accept,Accept-Encoding,Cookie
x-cache: Miss from cloudfront
x-amz-cf-pop: AMS1-P2
x-amz-cf-id: VcRQX1BJXPCa2qSk0PuDBugdc8eZ6BRDJBNX2KqLrCkUFmKfpFmuQw==

Environment

No response

Anything else?

No response

@lucacasonato lucacasonato changed the title Crates.io is redirecting to invalid URL Crates.io crate download API is redirecting to invalid URL Jul 20, 2023
@TheTerrasque
Copy link

@lucacasonato
Copy link
Author

lucacasonato commented Jul 20, 2023

FYI, @Turbo87 is now aware of the issue, and is reverting the latest rollout. Please use 👍 reactions, not comments to +1.

@ximon18
Copy link

ximon18 commented Jul 20, 2023

Works for me again now.

@Turbo87
Copy link
Member

Turbo87 commented Jul 20, 2023

deployment has been rolled back and I'll investigate on our staging environment. sorry for the noise, everyone! 🙈

@lucacasonato
Copy link
Author

Rollback is complete, and I am seeing recovery. Thanks @Turbo87!

@lucacasonato
Copy link
Author

I guess I'll keep it open until the root cause is found on staging.

@Turbo87 Turbo87 added C-bug 🐞 Category: unintended, undesired behavior A-backend ⚙️ labels Jul 20, 2023
@nevins-b
Copy link

@Turbo87
Copy link
Member

Turbo87 commented Jul 20, 2023

@nevins-b yep, I'm already working on a fix for that :)

@Turbo87
Copy link
Member

Turbo87 commented Jul 20, 2023

I've updated our status page too now.

@Turbo87
Copy link
Member

Turbo87 commented Jul 20, 2023

The fix is deployed to production now. I've verified that the "Steps to Reproduce" above (i.e. curl -i https://crates.io/api/v1/crates/smallvec/1.10.0/download) now works as intended.

Again, sorry for the broken deployment earlier... 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-bug 🐞 Category: unintended, undesired behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants