Hello again,
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.
Patch with a fix included.
Form presence clears get parameters. Is that intentional? I didn't find
anything that states get and post should be mutually exclusive.
### Eclipse Workspace Patch 1.0
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().contains(HttpHeaderConstants.VALUE_URLENCODED_FORM.toLowerCase())){
+
content.mark();
try {
setParameters(content.getString(