Home / Function/ testPrematureClosureWithChunkedEncoding1() — netty Function Reference

testPrematureClosureWithChunkedEncoding1() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseDecoderTest.java lines 447–464

    @Test
    public void testPrematureClosureWithChunkedEncoding1() throws Exception {
        EmbeddedChannel ch = new EmbeddedChannel(new HttpResponseDecoder());
        ch.writeInbound(
                Unpooled.copiedBuffer("HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n", CharsetUtil.US_ASCII));

        // Read the response headers.
        HttpResponse res = ch.readInbound();
        assertSame(HttpVersion.HTTP_1_1, res.protocolVersion());
        assertEquals(HttpResponseStatus.OK, res.status());
        assertEquals("chunked", res.headers().get(HttpHeaderNames.TRANSFER_ENCODING));
        assertNull(ch.readInbound());

        // Close the connection without sending anything.
        ch.finish();
        // The decoder should not generate the last chunk because it's closed prematurely.
        assertNull(ch.readInbound());
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free