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] [Commented] (CXF-6122) JAX-RS proxy client with @QueryParam is not encoding the parameter value
Date Tue, 02 Dec 2014 10:46:13 GMT

    [ https://issues.apache.org/jira/browse/CXF-6122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14231292#comment-14231292
] 

Sergey Beryozkin commented on CXF-6122:
---------------------------------------

The fix has been applied to ensure the plus contained in the original query component is not
percent-encoded so the code like
{code:java}
UriBuilder builder = UriBuilder.fromUri("http://localhost:8080/a");
        URI uri = builder.queryParam("phone", "+44 123").buildFromEncoded();
        URI newUri = UriBuilder.fromUri(uri).replacePath("b").buildFromEncoded();
{code}
would work as expectede

> JAX-RS proxy client with @QueryParam is not encoding the parameter value
> ------------------------------------------------------------------------
>
>                 Key: CXF-6122
>                 URL: https://issues.apache.org/jira/browse/CXF-6122
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.0.2
>            Reporter: Konrad Windszus
>            Assignee: Sergey Beryozkin
>
> If I create a JAX-RS client with the proxy pattern outlined at http://cxf.apache.org/docs/jax-rs-client-api.html#JAX-RSClientAPI-Proxy-basedAPI
and the proxy interface looks like this
> {code}
> @PUT
> 	@Path("/admin/user/{id}.json")
> 	@Produces(value = { "application/json" })
> 	public User updateUser(@PathParam("id") String userId, @QueryParam("country") String
country, @QueryParam("description") String role, @QueryParam("telephone") String phone);
> {code}
> all URL parameters are not correctly encoded.
> E.g. if phone contains a "+" this will not be converted to %2B or if the role contains
an umlaut this will not be encoded either.
> Another related question is: Which character set will be used here (I guess UTF-8 makes
sense) once that bug is fixed? Also how would it be possible to override the character set?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message