testExpectContinueResponse1() — netty Function Reference
Architecture documentation for the testExpectContinueResponse1() function in HttpContentDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 4066bce7_807b_bd8a_2107_f3aa628b5a0a["testExpectContinueResponse1()"] ea4ec426_b689_ab52_a554_7959aed6c709["HttpContentDecoderTest"] 4066bce7_807b_bd8a_2107_f3aa628b5a0a -->|defined in| ea4ec426_b689_ab52_a554_7959aed6c709 e1fd631d_8d14_d190_2463_40108ec003a4["assertHasInboundMessages()"] 4066bce7_807b_bd8a_2107_f3aa628b5a0a -->|calls| e1fd631d_8d14_d190_2463_40108ec003a4 465668ef_fec3_d4d9_164f_24dc020645ba["assertHasOutboundMessages()"] 4066bce7_807b_bd8a_2107_f3aa628b5a0a -->|calls| 465668ef_fec3_d4d9_164f_24dc020645ba style 4066bce7_807b_bd8a_2107_f3aa628b5a0a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/HttpContentDecoderTest.java lines 347–373
@Test
public void testExpectContinueResponse1() {
// request with header "Expect: 100-continue" must be replied with one "100 Continue" response
// case 1: no ContentDecoder in chain at all (baseline test)
HttpRequestDecoder decoder = new HttpRequestDecoder();
HttpObjectAggregator aggregator = new HttpObjectAggregator(1024);
EmbeddedChannel channel = new EmbeddedChannel(decoder, aggregator);
String req = "POST / HTTP/1.1\r\n" +
"Content-Length: " + GZ_HELLO_WORLD.length + "\r\n" +
"Expect: 100-continue\r\n" +
"\r\n";
// note: the following writeInbound() returns false as there is no message is inbound buffer
// until HttpObjectAggregator caches composes a complete message.
// however, http response "100 continue" must be sent as soon as headers are received
assertFalse(channel.writeInbound(Unpooled.wrappedBuffer(req.getBytes())));
Object o = channel.readOutbound();
assertInstanceOf(FullHttpResponse.class, o);
FullHttpResponse r = (FullHttpResponse) o;
assertEquals(100, r.status().code());
assertTrue(channel.writeInbound(Unpooled.copiedBuffer(GZ_HELLO_WORLD)));
r.release();
assertHasInboundMessages(channel, true);
assertHasOutboundMessages(channel, false);
assertFalse(channel.finish());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testExpectContinueResponse1() do?
testExpectContinueResponse1() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentDecoderTest.java.
Where is testExpectContinueResponse1() defined?
testExpectContinueResponse1() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentDecoderTest.java at line 347.
What does testExpectContinueResponse1() call?
testExpectContinueResponse1() calls 2 function(s): assertHasInboundMessages, assertHasOutboundMessages.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free