Home / Function/ testChunkedContentWithAssembledResponseIdentityEncoding() — netty Function Reference

testChunkedContentWithAssembledResponseIdentityEncoding() — netty Function Reference

Architecture documentation for the testChunkedContentWithAssembledResponseIdentityEncoding() function in HttpContentCompressorTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  4312bdb1_0bde_bc71_63f0_9820e32fd415["testChunkedContentWithAssembledResponseIdentityEncoding()"]
  32ab04b0_6c83_d4f7_6483_fd304f908331["HttpContentCompressorTest"]
  4312bdb1_0bde_bc71_63f0_9820e32fd415 -->|defined in| 32ab04b0_6c83_d4f7_6483_fd304f908331
  bc9df173_8fa5_18fe_12e1_d214292f4af7["AssembledHttpResponse()"]
  4312bdb1_0bde_bc71_63f0_9820e32fd415 -->|calls| bc9df173_8fa5_18fe_12e1_d214292f4af7
  bdf032ba_93a9_0f83_122a_c24ea71efa75["release()"]
  4312bdb1_0bde_bc71_63f0_9820e32fd415 -->|calls| bdf032ba_93a9_0f83_122a_c24ea71efa75
  style 4312bdb1_0bde_bc71_63f0_9820e32fd415 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorTest.java lines 255–283

    @Test
    public void testChunkedContentWithAssembledResponseIdentityEncoding() throws Exception {
        EmbeddedChannel ch = new EmbeddedChannel(new HttpContentCompressor());
        ch.writeInbound(new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "/"));

        HttpResponse res = new AssembledHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK,
                Unpooled.copiedBuffer("Hell", CharsetUtil.US_ASCII));
        res.headers().set(HttpHeaderNames.TRANSFER_ENCODING, HttpHeaderValues.CHUNKED);
        ch.writeOutbound(res);

        ch.writeOutbound(new DefaultHttpContent(Unpooled.copiedBuffer("o, w", CharsetUtil.US_ASCII)));
        ch.writeOutbound(new DefaultLastHttpContent(Unpooled.copiedBuffer("orld", CharsetUtil.US_ASCII)));

        HttpContent chunk;
        chunk = ch.readOutbound();
        assertEquals("Hell", chunk.content().toString(StandardCharsets.UTF_8));
        chunk.release();

        chunk = ch.readOutbound();
        assertEquals("o, w", chunk.content().toString(StandardCharsets.UTF_8));
        chunk.release();

        chunk = ch.readOutbound();
        assertEquals("orld", chunk.content().toString(StandardCharsets.UTF_8));
        assertInstanceOf(LastHttpContent.class, chunk);
        chunk.release();

        assertNull(ch.readOutbound());
    }

Domain

Subdomains

Frequently Asked Questions

What does testChunkedContentWithAssembledResponseIdentityEncoding() do?
testChunkedContentWithAssembledResponseIdentityEncoding() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorTest.java.
Where is testChunkedContentWithAssembledResponseIdentityEncoding() defined?
testChunkedContentWithAssembledResponseIdentityEncoding() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorTest.java at line 255.
What does testChunkedContentWithAssembledResponseIdentityEncoding() call?
testChunkedContentWithAssembledResponseIdentityEncoding() calls 2 function(s): AssembledHttpResponse, release.

Analyze Your Own Codebase

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

Try Supermodel Free