Closed MarcTreySonos closed 4 years ago
there is a regression in the latest version of the crate url version 2.1.1
the following code when invoked with an url whose scheme is ssh will return an error:
ssh
url.set_scheme("https").unwrap();
ref : https://github.com/rust-lang/cargo/blob/0.41.0/src/cargo/util/canonical_url.rs#L42
here is a simple test case to reproduce the issue :
extern crate url; use url::Url; fn main() { let mut url = Url::parse("ssh://example.net").unwrap(); let result = url.set_scheme("https"); assert_eq!(url.as_str(), "https://example.net/"); assert!(result.is_ok()); }
it will work with :
cargo update --package url --precise 2.0.0
it will fail with:
cargo update --package url --precise 2.1.1
ref : https://github.com/servo/rust-url/blob/v2.1.1/src/lib.rs#L1987
@kali latest url is back into master : https://github.com/snipsco/dinghy/blob/master/Cargo.lock#L584
there is a regression in the latest version of the crate url version 2.1.1
the following code when invoked with an url whose scheme is
ssh
will return an error:url.set_scheme("https").unwrap();
ref : https://github.com/rust-lang/cargo/blob/0.41.0/src/cargo/util/canonical_url.rs#L42
here is a simple test case to reproduce the issue :
it will work with :
it will fail with:
ref : https://github.com/servo/rust-url/blob/v2.1.1/src/lib.rs#L1987