diff --git a/codec-http/src/test/java/io/netty/handler/codec/http/HttpClientCodecTest.java b/codec-http/src/test/java/io/netty/handler/codec/http/HttpClientCodecTest.java index e53edc08d5..2f4ac8ba98 100644 --- a/codec-http/src/test/java/io/netty/handler/codec/http/HttpClientCodecTest.java +++ b/codec-http/src/test/java/io/netty/handler/codec/http/HttpClientCodecTest.java @@ -31,6 +31,10 @@ public class HttpClientCodecTest { private static final String RESPONSE = "HTTP/1.0 200 OK\r\n" + "Date: Fri, 31 Dec 1999 23:59:59 GMT\r\n" + "Content-Type: text/html\r\n" + "Content-Length: 28\r\n" + "\r\n" + "
\r\n"; + private static final String INCOMPLETE_CHUNKED_RESPONSE = "HTTP/1.1 200 OK\r\n" + "Content-Type: text/plain\r\n" + "Transfer-Encoding: chunked\r\n" + "\r\n" + +"5\r\n" + "first\r\n" + "6\r\n" + "second\r\n" + "0\r\n"; + private static final String CHUNKED_RESPONSE = INCOMPLETE_CHUNKED_RESPONSE + "\r\n"; + @Test public void testFailsNotOnRequestResponse() { @@ -46,6 +50,20 @@ public class HttpClientCodecTest { } + @Test + public void testFailsNotOnRequestResponseChunked() { + HttpClientCodec codec = new HttpClientCodec(); + DecoderEmbedder