test100ContinueWithBadClient() — netty Function Reference
Architecture documentation for the test100ContinueWithBadClient() function in HttpRequestDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD a1666fdb_3e78_fe98_a75a_e780f6c81225["test100ContinueWithBadClient()"] 514322d5_436a_d1ac_6240_1f9cf42934a4["HttpRequestDecoderTest"] a1666fdb_3e78_fe98_a75a_e780f6c81225 -->|defined in| 514322d5_436a_d1ac_6240_1f9cf42934a4 style a1666fdb_3e78_fe98_a75a_e780f6c81225 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java lines 296–324
@Test
public void test100ContinueWithBadClient() {
HttpRequestDecoder decoder = new HttpRequestDecoder();
EmbeddedChannel channel = new EmbeddedChannel(decoder);
String oversized =
"PUT /file HTTP/1.1\r\n" +
"Expect: 100-continue\r\n" +
"Content-Length: 1048576000\r\n\r\n" +
"WAY_TOO_LARGE_DATA_BEGINS";
channel.writeInbound(Unpooled.copiedBuffer(oversized, CharsetUtil.US_ASCII));
assertInstanceOf(HttpRequest.class, channel.readInbound());
HttpContent prematureData = channel.readInbound();
prematureData.release();
assertNull(channel.readInbound());
// At this point, we assume that we sent '413 Entity Too Large' to the peer without closing the connection
// so that the client can try again.
decoder.reset();
String query = "GET /max-file-size HTTP/1.1\r\n\r\n";
channel.writeInbound(Unpooled.copiedBuffer(query, CharsetUtil.US_ASCII));
assertInstanceOf(HttpRequest.class, channel.readInbound());
assertInstanceOf(LastHttpContent.class, channel.readInbound());
assertFalse(channel.finish());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test100ContinueWithBadClient() do?
test100ContinueWithBadClient() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java.
Where is test100ContinueWithBadClient() defined?
test100ContinueWithBadClient() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java at line 296.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free