Home / Function/ testClosureWithoutContentLength1() — netty Function Reference

testClosureWithoutContentLength1() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseDecoderTest.java lines 392–413

    @Test
    public void testClosureWithoutContentLength1() throws Exception {
        EmbeddedChannel ch = new EmbeddedChannel(new HttpResponseDecoder());
        ch.writeInbound(Unpooled.copiedBuffer("HTTP/1.1 200 OK\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());
        assertNull(ch.readInbound());

        // Close the connection without sending anything.
        assertTrue(ch.finish());

        // The decoder should still produce the last content.
        LastHttpContent content = ch.readInbound();
        assertFalse(content.content().isReadable());
        content.release();

        // But nothing more.
        assertNull(ch.readInbound());
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free