[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wink-dev
Subject:    [jira] [Created] (WINK-370) An error occurred when the the post parameter contains "&" (using Multiv
From:       "kevin chen (JIRA)" <jira () apache ! org>
Date:       2012-08-21 16:14:37
Message-ID: 1334251838.35939.1345565678146.JavaMail.jiratomcat () arcas
[Download RAW message or body]

kevin chen created WINK-370:
-------------------------------

             Summary: An error occurred when the 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
         Environment: OS: linux
Platform: karaf
            Reporter: kevin chen


  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 = UserRestClient.client.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: \
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more \
information on JIRA, see: http://www.atlassian.com/software/jira

       


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic