Home / Function/ testServerWithContentLength() — netty Function Reference

testServerWithContentLength() — netty Function Reference

Architecture documentation for the testServerWithContentLength() function in Http3RequestStreamValidationHandlerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  bce6fad3_84c3_f0b6_5fa7_3335253963fa["testServerWithContentLength()"]
  c95952ff_8157_1798_825c_bd4f00047c5a["Http3RequestStreamValidationHandlerTest"]
  bce6fad3_84c3_f0b6_5fa7_3335253963fa -->|defined in| c95952ff_8157_1798_825c_bd4f00047c5a
  878e89e1_6f77_c5d6_831a_f192ee357d39["testServerWithContentLengthNoData()"]
  878e89e1_6f77_c5d6_831a_f192ee357d39 -->|calls| bce6fad3_84c3_f0b6_5fa7_3335253963fa
  236e34e0_b6b9_255d_f66e_e652ea6c7dd2["testServerWithContentLengthNoDataAndTrailers()"]
  236e34e0_b6b9_255d_f66e_e652ea6c7dd2 -->|calls| bce6fad3_84c3_f0b6_5fa7_3335253963fa
  4a2c68b1_0b19_c2fe_bab2_6dc6b4571431["testServerWithContentLengthNotEnoughData()"]
  4a2c68b1_0b19_c2fe_bab2_6dc6b4571431 -->|calls| bce6fad3_84c3_f0b6_5fa7_3335253963fa
  e61aae13_75ed_4eb4_8234_134f9bb0160d["testServerWithContentLengthNotEnoughDataAndTrailer()"]
  e61aae13_75ed_4eb4_8234_134f9bb0160d -->|calls| bce6fad3_84c3_f0b6_5fa7_3335253963fa
  style bce6fad3_84c3_f0b6_5fa7_3335253963fa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http3/src/test/java/io/netty/handler/codec/http3/Http3RequestStreamValidationHandlerTest.java lines 310–332

    private void testServerWithContentLength(boolean noData, boolean trailers) throws Exception {
        EmbeddedQuicStreamChannel channel = newServerStream();

        Http3HeadersFrame headersFrame = new DefaultHttp3HeadersFrame();
        headersFrame.headers().setLong(HttpHeaderNames.CONTENT_LENGTH, 10);
        headersFrame.headers().method(HttpMethod.POST.asciiName());
        assertTrue(channel.writeInbound(headersFrame));

        if (!noData) {
            assertTrue(channel.writeInbound(new DefaultHttp3DataFrame(Unpooled.buffer().writeZero(9))));
        }
        try {
            if (trailers) {
                channel.writeInbound(new DefaultHttp3HeadersFrame());
            } else {
                channel.pipeline().fireUserEventTriggered(ChannelInputShutdownReadComplete.INSTANCE);
                channel.checkException();
            }
        } catch (Exception e) {
            assertException(Http3ErrorCode.H3_MESSAGE_ERROR, e);
        }
        assertTrue(channel.finishAndReleaseAll());
    }

Domain

Subdomains

Frequently Asked Questions

What does testServerWithContentLength() do?
testServerWithContentLength() is a function in the netty codebase, defined in codec-http3/src/test/java/io/netty/handler/codec/http3/Http3RequestStreamValidationHandlerTest.java.
Where is testServerWithContentLength() defined?
testServerWithContentLength() is defined in codec-http3/src/test/java/io/netty/handler/codec/http3/Http3RequestStreamValidationHandlerTest.java at line 310.
What calls testServerWithContentLength()?
testServerWithContentLength() is called by 4 function(s): testServerWithContentLengthNoData, testServerWithContentLengthNoDataAndTrailers, testServerWithContentLengthNotEnoughData, testServerWithContentLengthNotEnoughDataAndTrailer.

Analyze Your Own Codebase

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

Try Supermodel Free