testChunkedHeadResponse() — netty Function Reference
Architecture documentation for the testChunkedHeadResponse() function in HttpServerCodecTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 0a381bcf_9220_817a_2571_a07ccae6bc3c["testChunkedHeadResponse()"] b6cdc8d3_b482_5921_941d_6401914d1c4f["HttpServerCodecTest"] 0a381bcf_9220_817a_2571_a07ccae6bc3c -->|defined in| b6cdc8d3_b482_5921_941d_6401914d1c4f style 0a381bcf_9220_817a_2571_a07ccae6bc3c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/HttpServerCodecTest.java lines 120–149
@Test
public void testChunkedHeadResponse() {
EmbeddedChannel ch = new EmbeddedChannel(new HttpServerCodec());
// Send the request headers.
assertTrue(ch.writeInbound(Unpooled.copiedBuffer(
"HEAD / HTTP/1.1\r\n\r\n", CharsetUtil.UTF_8)));
HttpRequest request = ch.readInbound();
assertEquals(HttpMethod.HEAD, request.method());
LastHttpContent content = ch.readInbound();
assertFalse(content.content().isReadable());
content.release();
HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK);
HttpUtil.setTransferEncodingChunked(response, true);
assertTrue(ch.writeOutbound(response));
assertTrue(ch.writeOutbound(LastHttpContent.EMPTY_LAST_CONTENT));
assertTrue(ch.finish());
ByteBuf buf = ch.readOutbound();
assertEquals("HTTP/1.1 200 OK\r\ntransfer-encoding: chunked\r\n\r\n", buf.toString(CharsetUtil.US_ASCII));
buf.release();
buf = ch.readOutbound();
assertFalse(buf.isReadable());
buf.release();
assertFalse(ch.finishAndReleaseAll());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testChunkedHeadResponse() do?
testChunkedHeadResponse() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpServerCodecTest.java.
Where is testChunkedHeadResponse() defined?
testChunkedHeadResponse() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpServerCodecTest.java at line 120.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free