Home / Function/ testExpectContinueResponse2() — netty Function Reference

testExpectContinueResponse2() — netty Function Reference

Architecture documentation for the testExpectContinueResponse2() function in HttpContentDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  751606fd_ca7f_90e8_3ac4_8f402e9a4830["testExpectContinueResponse2()"]
  ea4ec426_b689_ab52_a554_7959aed6c709["HttpContentDecoderTest"]
  751606fd_ca7f_90e8_3ac4_8f402e9a4830 -->|defined in| ea4ec426_b689_ab52_a554_7959aed6c709
  e1fd631d_8d14_d190_2463_40108ec003a4["assertHasInboundMessages()"]
  751606fd_ca7f_90e8_3ac4_8f402e9a4830 -->|calls| e1fd631d_8d14_d190_2463_40108ec003a4
  465668ef_fec3_d4d9_164f_24dc020645ba["assertHasOutboundMessages()"]
  751606fd_ca7f_90e8_3ac4_8f402e9a4830 -->|calls| 465668ef_fec3_d4d9_164f_24dc020645ba
  style 751606fd_ca7f_90e8_3ac4_8f402e9a4830 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpContentDecoderTest.java lines 375–399

    @Test
    public void testExpectContinueResponse2() {
        // request with header "Expect: 100-continue" must be replied with one "100 Continue" response
        // case 2: contentDecoder is in chain, but the content is not encoded, should be no-op
        HttpRequestDecoder decoder = new HttpRequestDecoder();
        HttpContentDecoder decompressor = new HttpContentDecompressor(0);
        HttpObjectAggregator aggregator = new HttpObjectAggregator(1024);
        EmbeddedChannel channel = new EmbeddedChannel(decoder, decompressor, aggregator);
        String req = "POST / HTTP/1.1\r\n" +
                     "Content-Length: " + GZ_HELLO_WORLD.length + "\r\n" +
                     "Expect: 100-continue\r\n" +
                     "\r\n";
        assertFalse(channel.writeInbound(Unpooled.wrappedBuffer(req.getBytes())));

        Object o = channel.readOutbound();
        assertInstanceOf(FullHttpResponse.class, o);
        FullHttpResponse r = (FullHttpResponse) o;
        assertEquals(100, r.status().code());
        r.release();
        assertTrue(channel.writeInbound(Unpooled.copiedBuffer(GZ_HELLO_WORLD)));

        assertHasInboundMessages(channel, true);
        assertHasOutboundMessages(channel, false);
        assertFalse(channel.finish());
    }

Domain

Subdomains

Frequently Asked Questions

What does testExpectContinueResponse2() do?
testExpectContinueResponse2() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentDecoderTest.java.
Where is testExpectContinueResponse2() defined?
testExpectContinueResponse2() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentDecoderTest.java at line 375.
What does testExpectContinueResponse2() call?
testExpectContinueResponse2() 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