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

Julien Vermillard resolved ASYNCWEB-27.
---------------------------------------

    Resolution: Fixed

thanks, applied the patch

> Form processing
> ---------------
>
>                 Key: ASYNCWEB-27
>                 URL: https://issues.apache.org/jira/browse/ASYNCWEB-27
>             Project: Asyncweb
>          Issue Type: Bug
>            Reporter: Anton Tanasenko
>            Assignee: Julien Vermillard
>            Priority: Minor
>
> Version: latest trunk
> DefaultHttpRequest.setContent(IoBuffer) fails to read x-www-form-urlencoded 
> data if content type header also contains charset.
> Example: Content-type: application/x-www-form-urlencoded; charset=utf-8.
> Fix proposal:
> Index: common/src/main/java/org/apache/asyncweb/common/DefaultHttpRequest.java
> ===================================================================
> --- common/src/main/java/org/apache/asyncweb/common/DefaultHttpRequest.java   
> (revision 768267)
> +++ common/src/main/java/org/apache/asyncweb/common/DefaultHttpRequest.java   
> (working copy)
> @@ -280,8 +281,13 @@
>              throw new NullPointerException("content");
>          }
>          
> -        if (HttpHeaderConstants.VALUE_URLENCODED_FORM.equalsIgnoreCase(
> -                getContentType())) {
> +        String ct = getContentType();
> +        if(ct != null && 
> ct.toLowerCase().startsWith(HttpHeaderConstants.VALUE_URLENCODED_FORM.toLowerCase())){
> +
>              content.mark();
>              try {
>                  setParameters(content.getString(
> Also, form POST parameters cause GET parameters to be cleared. Is that 
> intentional? I didn't find anything that states get and post should be 
> mutually exclusive.

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

Reply via email to