cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-5036) ClientProxyImpl improperly encode parameters
Date Fri, 24 May 2013 13:52:21 GMT

     [ https://issues.apache.org/jira/browse/CXF-5036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Beryozkin resolved CXF-5036.
-----------------------------------

    Resolution: Invalid
      Assignee: Sergey Beryozkin

'%' must be encoded. Also note, UriBuilder.buildFromEncoded() actually is effectively equivalent
to UriBuilder.build(), except that the former does not double encode '%' in '%xx' sequences
                
> 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
>            Assignee: Sergey Beryozkin
>            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

Mime
View raw message