get-all-crates icon indicating copy to clipboard operation
get-all-crates copied to clipboard

Encode '+' sign in static.crates.io URLs

Open dtolnay opened this issue 2 years ago • 1 comments

See https://github.com/rust-lang/crates.io/issues/4891.

https://static.crates.io/crates/${crate}/${crate}-${version}+${metadata}.crate will stop working. It needs to be https://static.crates.io/crates/${crate}/${crate}-${version}%2B${metadata}.crate.

dtolnay avatar Jun 24 '23 04:06 dtolnay

If "Step 4" in the "Detailed Plan" in https://github.com/rust-lang/crates.io/issues/4891#issuecomment-1580879109 is possible, then there is no change needed in get-all-crates.

I would be sad if Step 4 is not possible.

Relevant t-infra Zulip topic is here: https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/crates.2Eio.20CDN.20path.20rewriting

dtolnay avatar Jun 24 '23 04:06 dtolnay

Step 4 for of the above issue has been implemented by https://github.com/rust-lang/simpleinfra/pull/313, which means that + will keep being supported for now. I guess we can close this issue? or do you think this is still worth adjusting? would version.to_string().replace('+', "%2B") be sufficient? I suppose the the download times of the crates are long enough that the extra allocation probably won't matter too much 😅

Turbo87 avatar Jun 04 '24 13:06 Turbo87

Great!

dtolnay avatar Jun 04 '24 13:06 dtolnay