This is an automated email from the ASF dual-hosted git repository. johnnyv pushed a commit to branch 2.0.X in repository https://gitbox.apache.org/repos/asf/mina.git
The following commit(s) were added to refs/heads/2.0.X by this push: new 3a91690 Backport fix for malformed HTTP decoder loop 3a91690 is described below commit 3a91690e574a69875a2fca1f0e363b0b9ff00469 Author: Jonathan Valliere <john...@apache.org> AuthorDate: Thu Oct 14 23:34:17 2021 -0400 Backport fix for malformed HTTP decoder loop --- mina-http/src/main/java/org/apache/mina/http/HttpServerDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mina-http/src/main/java/org/apache/mina/http/HttpServerDecoder.java b/mina-http/src/main/java/org/apache/mina/http/HttpServerDecoder.java index 4f9ed59..d861216 100644 --- a/mina-http/src/main/java/org/apache/mina/http/HttpServerDecoder.java +++ b/mina-http/src/main/java/org/apache/mina/http/HttpServerDecoder.java @@ -194,7 +194,7 @@ public class HttpServerDecoder implements ProtocolDecoder { } private HttpRequestImpl parseHttpRequestHead(ByteBuffer buffer) { - String raw = new String(buffer.array(), 0, buffer.limit()); + String raw = new String(buffer.array(), buffer.position(), buffer.remaining()); String[] headersAndBody = RAW_VALUE_PATTERN.split(raw, -1); if (headersAndBody.length <= 1) {