axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Godwin Chapman (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AXIS2-3748) [REST support] when using POST with x-www-form-urlencoded data aren't decode from url encoded
Date Fri, 18 Apr 2008 01:17:21 GMT

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

Keith Godwin Chapman resolved AXIS2-3748.
-----------------------------------------

    Resolution: Fixed

This has already been fixed in Axis2 trunk and hence will be available in Axis 1.4. Can you
verify using the nightly build please.

> [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


Mime
View raw message