diff --git a/src/main/java/io/netty/handler/codec/http/HttpPostRequestDecoder.java b/src/main/java/io/netty/handler/codec/http/HttpPostRequestDecoder.java index bcd4ba6f8d..fa9228b171 100644 --- a/src/main/java/io/netty/handler/codec/http/HttpPostRequestDecoder.java +++ b/src/main/java/io/netty/handler/codec/http/HttpPostRequestDecoder.java @@ -452,7 +452,19 @@ public class HttpPostRequestDecoder { charset); currentAttribute = factory.createAttribute(request, key); 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; case FIELD:// search '&' or end of line if (read == '&') {