testEmptyFullContentWithTrailer() — netty Function Reference
Architecture documentation for the testEmptyFullContentWithTrailer() function in HttpContentEncoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 03410af7_989a_dbb6_f66e_4213eacbd1f4["testEmptyFullContentWithTrailer()"] 992a26d3_2083_aeb8_4785_63c545814355["HttpContentEncoderTest"] 03410af7_989a_dbb6_f66e_4213eacbd1f4 -->|defined in| 992a26d3_2083_aeb8_4785_63c545814355 style 03410af7_989a_dbb6_f66e_4213eacbd1f4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/HttpContentEncoderTest.java lines 273–296
@Test
public void testEmptyFullContentWithTrailer() throws Exception {
EmbeddedChannel ch = new EmbeddedChannel(new TestEncoder());
ch.writeInbound(new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "/"));
FullHttpResponse res = new DefaultFullHttpResponse(
HttpVersion.HTTP_1_1, HttpResponseStatus.OK, Unpooled.EMPTY_BUFFER);
res.trailingHeaders().set(of("X-Test"), of("Netty"));
ch.writeOutbound(res);
Object o = ch.readOutbound();
assertInstanceOf(FullHttpResponse.class, o);
res = (FullHttpResponse) o;
assertNull(res.headers().get(HttpHeaderNames.TRANSFER_ENCODING));
// Content encoding shouldn't be modified.
assertNull(res.headers().get(HttpHeaderNames.CONTENT_ENCODING));
assertEquals(0, res.content().readableBytes());
assertEquals("", res.content().toString(CharsetUtil.US_ASCII));
assertEquals("Netty", res.trailingHeaders().get(of("X-Test")));
assertEquals(DecoderResult.SUCCESS, res.decoderResult());
assertNull(ch.readOutbound());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testEmptyFullContentWithTrailer() do?
testEmptyFullContentWithTrailer() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentEncoderTest.java.
Where is testEmptyFullContentWithTrailer() defined?
testEmptyFullContentWithTrailer() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentEncoderTest.java at line 273.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free