Ivan Latysh created CXF-5036:
--------------------------------

             Summary: ClientProxyImpl improperly encode parameters
                 Key: CXF-5036
                 URL: https://issues.apache.org/jira/browse/CXF-5036
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS
    Affects Versions: 2.4.3
            Reporter: Ivan Latysh
            Priority: Blocker


Spring app with configured client
{code}
<jaxrs:client id="client" 
  address="http://localhost/service"; 
  serviceClass="com.Service"/>
{code}

Now call the method
{code}
service.foo("AA"); // http://localhost/service/foo?param=AA
service.foo("%AA%"); // http://localhost/service/foo?param=%AA%25
{code}

The second URL is incorrect, as it corrupt the parameter value. The cause of 
this problem is {{org.apache.cxf.jaxrs.client.AbstractClient}} 
{code}
public Object invoke(Object o, Method m, Object[] params) throws Throwable {
...
URI uri = builder.buildFromEncoded(pathParams.toArray()).normalize();
...
{code}

Parameter values are not encoded, so {{builder.build()}} should be called 
instead.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to