You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Luciano Resende (JIRA)" <ji...@apache.org> on 2013/04/15 16:44:16 UTC

[jira] [Updated] (WINK-370) An error occurred when the post parameter contains "&" (using MultivaluedMap)

     [ 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.3)
                   1.4
    
> 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.4
>
>
>   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 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