Hi Andy
It is most likely caused by UriBuilder parsing the URI and then dropping
the empty path segments.
As far as I recall UriBuilder.path() must guarantee that if we have say
.path("a/").path("/b") then the builder should ensure no duplicate "//"
appear in the final URI.
However I'm not sure what the expectations are if the "//" was in the
initial URI value, whether it should be preserved or not.
Do you know by any chance what RI does in this case, at the UriBuilder
level ?
Thanks, Sergey
On 05/06/17 15:29, Andy McCright wrote:
Hi All,
One of our customers hit an issue where they cannot preserve an empty slash
in an outbound request.
For example, they code up:
WebTarget target = ClientBuilder.newClient().target("
http://example.com/api//something");
System.out.println(target.getUri());
but the resulting URI is: "http://example.com/api/something" without the
extra slash between api and something.
Is there any way to prevent the normalization that removes the extra slash?
The original customer post is here:
https://developer.ibm.com/answers/questions/378780/how-can-i-create-a-webtarget-with-double-in-path.html
The customer did not say, but I believe they may be using a WebSphere
Liberty version that ships with CXF 3.1.8.
Thanks in advance,
Andy