rust-lang / crates.io

The Rust package registry

Home Page:https://crates.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crates.io crate download API is redirecting to invalid URL

lucacasonato opened this issue · comments

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

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

Works for me again now.

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

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

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

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

I've updated our status page too now.

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... 😞