Repository navigation
Conversation
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
…a path Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
… a path Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
…its query or fragment Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
… query tests Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
remove_dot_segments() added the empty last segment after a final '/.'
or '/..' only at the very end of the string, so it dropped the '/' when
a '?' or '#' followed: '/abc/def/./ghi/../..#abc' gave '/abc#abc'
instead of '/abc/#abc' (RFC 3986, section 5.2.4). resolve() worked
around this for relative paths only, so absolute IRIs and network-path
references still lost the '/' ('http://abc/def/.?x' gave
'http://abc/def?x').
Add the empty last segment whenever the dot segment is not followed by
another '/'. This is the same fix as relative-to-absolute-iri.js#33.
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
resolve() split the reference at its first '?' or '#' so that remove_dot_segments() would not drop the '/' of a final dot segment. remove_dot_segments() now keeps it, so the split is no longer needed. This changes no result. Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Since the query of the base IRI is dropped before the scheme check, a base IRI such as 'def?x:y' has no scheme left and raises a ValueError for a path reference, as a base IRI without any ':' does. Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
The fix now lives in remove_dot_segments(), so it applies to every reference, including absolute IRIs and network-path references. Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
jdsika
force-pushed
the
fix/iri-resolve-base-without-path
branch
from
November 13, 2026 08:52
d167f6e to
0dcdfdc
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirror of digitalbazaar#372, which has the description, the reproducer and the review.