[
https://issues.apache.org/jira/browse/CXF-8553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17364729#comment-17364729
]
Nicolas Lenoire commented on CXF-8553:
--------------------------------------
Hi [~reta],
Yes, I also realized that using template params can be used as workaround.
However I'd have loved to be able to use UrlBuilder.queryParam with non URI
template params because otherwise I then need to 1) iterate to build the
variable names 2) iterate to resolve the values, but I understand that's not in
your plan and that TCK tests are assuming this behavior ...
Fair enough, I will use the template params solution.
Thanks
> UriBuilder does not properly encode query parameters
> ----------------------------------------------------
>
> Key: CXF-8553
> URL: https://issues.apache.org/jira/browse/CXF-8553
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 3.4.3
> Reporter: Nicolas Lenoire
> Assignee: Freeman Yue Fang
> Priority: Major
>
> The JAXRS specification seems unclear regarding how the method
> {code:java}
> UriBuilder.queryParam(String name, Object… values){code}
> treats values w/ URL encoding. However, we could legitimately assume this
> method properly URL encodes parameter values.
> CXF implementation URL encodes values, but with some defects:
> invoking
> {code:java}UriBuilder.fromUri("my/path").queryParam("p",
> "%250%").toTemplate(){code}
> produces the URI template
> {code:java}
> my/path?p=%250%25 {code}
> instead of
> {code:java}
> my/path?p=%25250%25{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)