[
https://issues.apache.org/jira/browse/WINK-370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Luciano Resende updated WINK-370:
---------------------------------
Fix Version/s: (was: 1.4)
1.5
> An error occurred when the post parameter contains "&" (using MultivaluedMap)
> -----------------------------------------------------------------------------
>
> Key: WINK-370
> URL: https://issues.apache.org/jira/browse/WINK-370
> Project: Wink
> Issue Type: Bug
> Components: Common
> Affects Versions: 1.3
> Environment: OS: linux
> Platform: karaf
> Reporter: kevin chen
> Fix For: 1.5
>
>
> I use MultivaluedMap to post parameter which contains "&", such as "i&123".
> But the parameter becomes "i" when it reach the server endpoint. I find the
> code in wink-common:
> String string = MultivaluedMapImpl.toString(t, "&"); //$NON-NLS-1$
> The method toString() links parameter with "&", but did not deal with the
> case that the parameter contains "&" itself.
> The client code show as follows:
> Resource resource = new RestClient().resource(url);
> MultivaluedMap<String, Object> params = new MultivaluedMapImpl<String,
> Object>();
> params.add("parameter", "i&123");
> ClientResponse response =
> resource.accept(MediaType.APPLICATION_JSON).post(params);
--
This message was sent by Atlassian JIRA
(v6.1#6144)