You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use url::Url;fnmain(){println!("{:?}",Url::parse("http://127.0.0.1").unwrap().host());println!("{:?}",Url::parse("custom://127.0.0.1").unwrap().host());}
$ cargo run
[…]
Some(Ipv4(127.0.0.1))
Some(Domain("127.0.0.1"))
The text was updated successfully, but these errors were encountered:
This is probably a duplicate of #606 in which it is explained that this is part of the URL standard.
I also created #763 to request a compile-time setting for including more schemes to this standard list of "special" schemes that have this behavior. In the meantime I forked the library and hardcoded the schemes I needed myself, maybe this works for you too: master...lufte:rust-url:gemini
Given how often something like this comes up. It might be worth at least adding something to the crate documentation to warn that the behavior is different for "special" schemes, and why that is.
This should at least be documented as a pitfall.
The text was updated successfully, but these errors were encountered: