-
-
Notifications
You must be signed in to change notification settings - Fork 340
Open
Description
As this crate stands for correctness, it is imperative to fix misleading terminology that is used through out the request-target handling documentation.
- Use
HttpRequestTarget
instead ofUri
, as it really handles only request target forms, not identity scheme in any way. This may be difficult, noting it is a breaking change. Can alias and deprecate though. - In documentation of current
Uri
struct, There is extensive use ofabsolute-uri
/relative-uri
dichotomy to show that, forabsolute-uri
it hasport
,scheme
, etc, and forrelative-uri
it won't. This is grossly misleading. As this crate is not handling identifiers in the first place, there is no such thing asabsolute-uri
/relative-uri
dichotomy. It is instead dichotomy ofabsolute-form
/origin-form
of request target. i.e, request-target inabsolute-form
encodes port, scheme etc, and that inorigin-form
doesn't, as they have to be runtime-resolved. That's also the reason the mis-termedrelative-uri
s starts with a/
, as they are not really identifiers, relative/absolute, butorigin-form
resource targets.
The second point of fixing documentation may not be breaking change, and possible i hope.
We can see many misunderstandings due to this misleading. for example
- Get fragment of Uri #127, As These are not identifiers, but representation of request-target values, there is no uri, and thus no fragments in first place.
- Parsing "http://localhost" as URI results in
path_and_query: Some("/")
#465 Same mis-issue of using request-target representation to represent identifiers - Cannot parse URI without authority component #469 They even mention other uri-schemes in issue discription, and also quotes uri-standard. Same mis-issue.
- Interoperability with servo URL? #396 ,
url
crate is for identifiers, where as this one only deals with request-targets. - URI parser cannot parse URNs #379 same issue. This crate doesn't handles uris in first place. only request targets.
- The hyperium URI parser is stricter than the url crate #342
- Uri parses "example.com" but fails to parse "example.com/foo" #311
- parse::<Uri> fails to parse uris with triple slash after scheme #323
- Correctly parse file URIs #421
- Spec non-compliance inconsistency in URI parsing #306
Uri::path()
and andUri::path_and_query()
have confusing semantics #176- Request "always" has a Uri #110
so on, so forth.
For amount of confusion, ad misleading it creates, It may be helpful to fix at least terminology in docs, and fix Uri
name for struct before 1.0
johannescpk, seppeljordan, sukawasatoru, LukasKalbertodt, robjtede and 2 more
Metadata
Metadata
Assignees
Labels
No labels