Home / Function/ testWhiteSpaceGarbageChunk() — netty Function Reference

testWhiteSpaceGarbageChunk() — netty Function Reference

Architecture documentation for the testWhiteSpaceGarbageChunk() function in HttpResponseDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  020e13e3_4e40_63f9_81e2_8f62eb0bd511["testWhiteSpaceGarbageChunk()"]
  90546a8c_51c4_a9dc_b6e8_695d29269596["HttpResponseDecoderTest"]
  020e13e3_4e40_63f9_81e2_8f62eb0bd511 -->|defined in| 90546a8c_51c4_a9dc_b6e8_695d29269596
  style 020e13e3_4e40_63f9_81e2_8f62eb0bd511 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseDecoderTest.java lines 885–906

    @Test
    public void testWhiteSpaceGarbageChunk() {
        EmbeddedChannel channel = new EmbeddedChannel(new HttpResponseDecoder());
        String responseWithIllegalChunk =
                "HTTP/1.1 200 OK\r\n" +
                "Transfer-Encoding: chunked\r\n\r\n" +
                " \r\n";

        channel.writeInbound(Unpooled.copiedBuffer(responseWithIllegalChunk, CharsetUtil.US_ASCII));
        assertInstanceOf(HttpResponse.class, channel.readInbound());

        // Ensure that the decoder generates the last chunk with correct decoder result.
        LastHttpContent invalidChunk = channel.readInbound();
        assertTrue(invalidChunk.decoderResult().isFailure());
        invalidChunk.release();

        // And no more messages should be produced by the decoder.
        assertNull(channel.readInbound());

        // .. even after the connection is closed.
        assertFalse(channel.finish());
    }

Domain

Subdomains

Frequently Asked Questions

What does testWhiteSpaceGarbageChunk() do?
testWhiteSpaceGarbageChunk() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseDecoderTest.java.
Where is testWhiteSpaceGarbageChunk() defined?
testWhiteSpaceGarbageChunk() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseDecoderTest.java at line 885.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free