mustRejectImproperlyTerminatedChunkExtensions() — netty Function Reference
Architecture documentation for the mustRejectImproperlyTerminatedChunkExtensions() function in HttpResponseDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 789ed0e4_ed56_dadc_49f1_a6fed66ed29c["mustRejectImproperlyTerminatedChunkExtensions()"] 90546a8c_51c4_a9dc_b6e8_695d29269596["HttpResponseDecoderTest"] 789ed0e4_ed56_dadc_49f1_a6fed66ed29c -->|defined in| 90546a8c_51c4_a9dc_b6e8_695d29269596 style 789ed0e4_ed56_dadc_49f1_a6fed66ed29c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseDecoderTest.java lines 1000–1025
@Test
void mustRejectImproperlyTerminatedChunkExtensions() throws Exception {
// See full explanation: https://w4ke.info/2025/06/18/funky-chunks.html
String requestStr = "HTTP/1.1 200 OK\r\n" +
"Transfer-Encoding: chunked\r\n" +
"\r\n" +
"2;\n" + // Chunk size followed by illegal single newline (not preceded by carraige return)
"xx\r\n" +
"1D\r\n" +
"0\r\n\r\n" +
"HTTP/1.1 200 OK\r\n" +
"Transfer-Encoding: chunked\r\n\r\n" +
"0\r\n\r\n";
EmbeddedChannel channel = new EmbeddedChannel(new HttpResponseDecoder());
assertTrue(channel.writeInbound(Unpooled.copiedBuffer(requestStr, CharsetUtil.US_ASCII)));
HttpResponse response = channel.readInbound();
assertFalse(response.decoderResult().isFailure()); // We parse the headers just fine.
assertTrue(response.headers().names().contains("Transfer-Encoding"));
assertTrue(response.headers().contains("Transfer-Encoding", "chunked", false));
HttpContent content = channel.readInbound();
DecoderResult decoderResult = content.decoderResult();
assertTrue(decoderResult.isFailure()); // But parsing the chunk must fail.
assertThat(decoderResult.cause()).isInstanceOf(InvalidChunkExtensionException.class);
content.release();
assertFalse(channel.finish());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does mustRejectImproperlyTerminatedChunkExtensions() do?
mustRejectImproperlyTerminatedChunkExtensions() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseDecoderTest.java.
Where is mustRejectImproperlyTerminatedChunkExtensions() defined?
mustRejectImproperlyTerminatedChunkExtensions() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseDecoderTest.java at line 1000.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free