Home / Function/ testOversizedRequestWith100ContinueAndDecoder() — netty Function Reference

testOversizedRequestWith100ContinueAndDecoder() — netty Function Reference

Architecture documentation for the testOversizedRequestWith100ContinueAndDecoder() function in HttpObjectAggregatorTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  a20c4c61_8a0a_03a0_6885_9d69a27c1c44["testOversizedRequestWith100ContinueAndDecoder()"]
  32ca569a_2b67_1114_bbc8_cbf703c91b95["HttpObjectAggregatorTest"]
  a20c4c61_8a0a_03a0_6885_9d69a27c1c44 -->|defined in| 32ca569a_2b67_1114_bbc8_cbf703c91b95
  style a20c4c61_8a0a_03a0_6885_9d69a27c1c44 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpObjectAggregatorTest.java lines 496–523

    @Test
    public void testOversizedRequestWith100ContinueAndDecoder() {
        EmbeddedChannel embedder = new EmbeddedChannel(new HttpRequestDecoder(), new HttpObjectAggregator(4));
        embedder.writeInbound(Unpooled.copiedBuffer(
                "PUT /upload HTTP/1.1\r\n" +
                        "Expect: 100-continue\r\n" +
                        "Content-Length: 100\r\n\r\n", CharsetUtil.US_ASCII));

        assertNull(embedder.readInbound());

        FullHttpResponse response = embedder.readOutbound();
        assertEquals(HttpResponseStatus.REQUEST_ENTITY_TOO_LARGE, response.status());
        assertEquals("0", response.headers().get(HttpHeaderNames.CONTENT_LENGTH));

        // 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.
        embedder.writeInbound(Unpooled.copiedBuffer("GET /max-upload-size HTTP/1.1\r\n\r\n", CharsetUtil.US_ASCII));

        FullHttpRequest request = embedder.readInbound();
        assertEquals(HttpMethod.GET, request.method());
        assertEquals("/max-upload-size", request.uri());
        assertEquals(0, request.content().readableBytes());
        request.release();

        assertFalse(embedder.finish());
    }

Domain

Subdomains

Frequently Asked Questions

What does testOversizedRequestWith100ContinueAndDecoder() do?
testOversizedRequestWith100ContinueAndDecoder() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpObjectAggregatorTest.java.
Where is testOversizedRequestWith100ContinueAndDecoder() defined?
testOversizedRequestWith100ContinueAndDecoder() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpObjectAggregatorTest.java at line 496.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free