Open
Description
Per RFC 3986, a valid URI may contain an empty authority (via an empty reg-name
). However, it does not parse correctly by the Uri type:
[src/main.rs:6:5] "file:///a/b/c".parse::<Uri>() = Err(
InvalidUri(
InvalidFormat,
),
Similarly, from_parts
complains specifically that the authority is missing:
[src/main.rs:11:5] Uri::from_parts(parts) = Err(
InvalidUriParts(
InvalidUri(
AuthorityMissing,
),
),
I could look into a change here, but note this fix would also be a breaking behavior change, and if any users are intentionally using this to enforce a non-empty authority, then they would be impacted.
cc @seanmonstar @LucioFranco - thanks!
Metadata
Metadata
Assignees
Labels
No labels