HttpPostRequestDecoder should handle "a&b=c" in
application/x-www-form-urlencoded content. See #134
This commit is contained in:
parent
f05b7b0b7e
commit
f7be7ba735
@ -452,7 +452,19 @@ public class HttpPostRequestDecoder {
|
|||||||
charset);
|
charset);
|
||||||
currentAttribute = factory.createAttribute(request, key);
|
currentAttribute = factory.createAttribute(request, key);
|
||||||
firstpos = currentpos;
|
firstpos = currentpos;
|
||||||
|
} else if (read == '&') { // special empty FIELD
|
||||||
|
currentStatus = MultiPartStatus.DISPOSITION;
|
||||||
|
ampersandpos = currentpos - 1;
|
||||||
|
String key = decodeAttribute(undecodedChunk.toString(firstpos, ampersandpos - firstpos, charset), charset);
|
||||||
|
currentAttribute = factory.createAttribute(request, key);
|
||||||
|
currentAttribute.setValue(""); // empty
|
||||||
|
addHttpData(currentAttribute);
|
||||||
|
currentAttribute = null;
|
||||||
|
firstpos = currentpos;
|
||||||
|
contRead = true;
|
||||||
}
|
}
|
||||||
|
// END OF FIX
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case FIELD:// search '&' or end of line
|
case FIELD:// search '&' or end of line
|
||||||
if (read == '&') {
|
if (read == '&') {
|
||||||
|
Loading…
Reference in New Issue
Block a user