Repository navigation
Commit 06d3b89
committed
Jakarta REST client: do not produce '//' when base URI ends in '/'
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).1 parent c7e084f commit 06d3b89
2 files changed
Lines changed: 28 additions & 0 deletions
File tree
- httpclient5-jakarta-rest-client/src
- main/java/org/apache/hc/client5/http/rest
- test/java/org/apache/hc/client5/http/rest
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
160 | 170 | | |
161 | 171 | | |
162 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
163 | 181 | | |
164 | 182 | | |
165 | 183 | | |
| |||
0 commit comments