You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Keith Godwin Chapman (JIRA)" <ji...@apache.org> on 2008/04/18 03:15:21 UTC

[jira] Assigned: (AXIS2-3748) [REST support] when using POST with x-www-form-urlencoded data aren't decode from url encoded

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

Keith Godwin Chapman reassigned AXIS2-3748:
-------------------------------------------

    Assignee: Keith Godwin Chapman

> [REST support] when using POST with x-www-form-urlencoded data aren't decode from url encoded
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3748
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3748
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: All
>            Reporter: Willy ANTOINE
>            Assignee: Keith Godwin Chapman
>   Original Estimate: 0.33h
>  Remaining Estimate: 0.33h
>
> When the client send REST request through POST, the data are urlencoded. 
> In this case, the org.apache.axis2.builder.XFormURLEncodedBuilder class takes value from the request's inputstream in the extractParametersFromRequest method, and put them into the parameterMap as is. 
> This problem doesn't appears in GET method because the application server is doing the job when calling request.getParameter() 
> So the data must be decoded before to be put in the parameterMap.
> The following code
>                         for (int i = 0; i < parts.length; i++) {
>                             int separator = parts[i].indexOf("=");
>                             parameterMap.put(parts[i].substring(0, separator),parts[i].substring(separator +
>                                         1));
>                         }
> Must be changed to
>                         for (int i = 0; i < parts.length; i++) {
>                             int separator = parts[i].indexOf("=");
>                             parameterMap.put(parts[i].substring(0, separator),
>                                 URLDecoder.decode(parts[i].substring(separator +
>                                         1), charsetEncoding));
>                         }
> Best regards

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org