axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Zafke (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-3748) [REST support] when using POST with x-www-form-urlencoded data aren't decode from url encoded
Date Thu, 20 Jan 2011 20:30:54 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-3748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984382#action_12984382
] 

Tobias Zafke commented on AXIS2-3748:
-------------------------------------

Hi,

is there a reason for not decoding '+' to ' ' as the proposed URLdecoder
would do?

Zaffi


Tobias Zafke
Richard-Wagner-Str. 13
63263 Neu-Isenburg

+49 175 72 19 856 (mobile)
+49 6102 574 276 (home)

145 - 349 - 133 (ICQ)
tobiaszafke (Skype)

tobias@zafke.de (eMail)
t.zafke@gmail.com (alternativ eMail)


> [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: 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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message