fix: remove a trailing slash in registry index URL (#1528)

This commit is contained in:
Marcus Griep 2023-12-14 23:14:21 -07:00 committed by GitHub
parent f29543e555
commit b296ac5315
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,7 +152,7 @@ impl Registry {
fn from_str_inner(s: &str) -> Result<Self, InvalidRegistryErrorInner> {
if let Some(s) = s.strip_prefix("sparse+") {
let url = Url::parse(s)?;
let url = Url::parse(s.trim_end_matches('/'))?;
let scheme = url.scheme();
if scheme != "http" && scheme != "https" {