runUnsupportedExceptHeaderExceptionTest() — netty Function Reference
Architecture documentation for the runUnsupportedExceptHeaderExceptionTest() function in HttpObjectAggregatorTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 10d8273b_1713_e516_2c87_37f969815911["runUnsupportedExceptHeaderExceptionTest()"] 32ca569a_2b67_1114_bbc8_cbf703c91b95["HttpObjectAggregatorTest"] 10d8273b_1713_e516_2c87_37f969815911 -->|defined in| 32ca569a_2b67_1114_bbc8_cbf703c91b95 ab8e9582_af4a_b96a_4dc7_616e6f543cd4["testUnsupportedExpectHeaderExpectation()"] ab8e9582_af4a_b96a_4dc7_616e6f543cd4 -->|calls| 10d8273b_1713_e516_2c87_37f969815911 style 10d8273b_1713_e516_2c87_37f969815911 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/HttpObjectAggregatorTest.java lines 439–477
private static void runUnsupportedExceptHeaderExceptionTest(final boolean close) {
final HttpObjectAggregator aggregator;
final int maxContentLength = 4;
if (close) {
aggregator = new HttpObjectAggregator(maxContentLength, true);
} else {
aggregator = new HttpObjectAggregator(maxContentLength);
}
final EmbeddedChannel embedder = new EmbeddedChannel(new HttpRequestDecoder(), aggregator);
assertFalse(embedder.writeInbound(Unpooled.copiedBuffer(
"GET / HTTP/1.1\r\n" +
"Expect: chocolate=yummy\r\n" +
"Content-Length: 100\r\n\r\n", CharsetUtil.US_ASCII)));
assertNull(embedder.readInbound());
final FullHttpResponse response = embedder.readOutbound();
assertEquals(HttpResponseStatus.EXPECTATION_FAILED, response.status());
assertEquals("0", response.headers().get(HttpHeaderNames.CONTENT_LENGTH));
response.release();
if (close) {
assertFalse(embedder.isOpen());
} else {
// keep-alive is on by default in HTTP/1.1, so the connection should be still alive
assertTrue(embedder.isOpen());
// the decoder should be reset by the aggregator at this point and be able to decode the next request
assertTrue(embedder.writeInbound(Unpooled.copiedBuffer("GET / HTTP/1.1\r\n\r\n", CharsetUtil.US_ASCII)));
final FullHttpRequest request = embedder.readInbound();
assertEquals(HttpMethod.GET, request.method());
assertEquals("/", request.uri());
assertEquals(0, request.content().readableBytes());
request.release();
}
assertFalse(embedder.finish());
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does runUnsupportedExceptHeaderExceptionTest() do?
runUnsupportedExceptHeaderExceptionTest() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpObjectAggregatorTest.java.
Where is runUnsupportedExceptHeaderExceptionTest() defined?
runUnsupportedExceptHeaderExceptionTest() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpObjectAggregatorTest.java at line 439.
What calls runUnsupportedExceptHeaderExceptionTest()?
runUnsupportedExceptHeaderExceptionTest() is called by 1 function(s): testUnsupportedExpectHeaderExpectation.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free