Repository navigation
Jakarta REST client: do not produce '//' when base URI ends in '/' - #938
Merged
arturobernalg merged 1 commit intoNov 13, 2026
Merged
Conversation
Member
Author
|
@PDGGK please check |
ok2c
reviewed
Nov 12, 2026
RestInvocationHandler appends the resolved resource path after the base URI's path segments. A base URI ending in '/' has an empty last segment, so the append produced a double slash. Drop that trailing empty segment before appending, the same way ResourceIfaceScanner#join already does when joining a resource class's path with its method's. URIBuilder itself is unchanged: an empty path segment is meaningful per RFC 3986 and this is specific to how the REST client joins two already-resolved paths, not to path segment manipulation in general. Follow-up to apache/httpcomponents-core#745, which traced the bug to this exact join but put the fix in the wrong layer (URIBuilder).
arturobernalg
force-pushed
the
rest-client-append-trailing-slash
branch
from
November 12, 2026 20:30
06d3b89 to
359420c
Compare
ok2c
approved these changes
Nov 12, 2026
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.
Fixes apache/httpcomponents-core#745 in the layer where it belongs. A base URI ending in '/' has an empty last path segment, so RestInvocationHandler's append produced '//'. Drops that trailing empty segment before appending, the same way ResourceIfaceScanner#join already does for class+method paths.
URIBuilder itself is untouched; an empty segment is still meaningful there.