You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Nicolas Lenoire (Jira)" <ji...@apache.org> on 2021/06/15 07:48:00 UTC
[jira] [Created] (CXF-8553) UriBuilder does not properly encode
query parameters
Nicolas Lenoire created CXF-8553:
------------------------------------
Summary: 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
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)