lo48576 / iri-string

String types for URIs/IRIs.
Apache License 2.0
15 stars 3 forks source link

Revisiting relative IRI resolution API #31

Closed lo48576 closed 6 days ago

lo48576 commented 2 years ago

Re: Incompleteness of reference resolution algorithm in RFC 3986 from Roy T. Fielding on 2022-08-25 (uri@w3.org from August 2022)

Summary (IIUC):

Thus, the possible choices are:

lo48576 commented 2 years ago

I think the current API is not so bad, but I can add a note to say "don't resolve against an IRI that does not use hierarchical name space. It is your responsibility to check that (using ensure_rfc3986_normalizable())!".

Another thing to consider is, what is the reasonable fallback for "meaningless" resolution?

Currently provided modes are "prepend /. anyway" mode and "prepend /. if absolute, or do nothing if relative". I think they will be enough, but is there any other algorithms that are used widely in real world?