Home / Function/ setupMessageLength() — netty Function Reference

setupMessageLength() — netty Function Reference

Architecture documentation for the setupMessageLength() function in HttpServerKeepAliveHandlerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  4a65f9df_769d_214b_e196_3b450aa1375b["setupMessageLength()"]
  be1dd72c_0689_de7f_2cae_50d18d342f5c["HttpServerKeepAliveHandlerTest"]
  4a65f9df_769d_214b_e196_3b450aa1375b -->|defined in| be1dd72c_0689_de7f_2cae_50d18d342f5c
  69511d36_cbb6_3cd3_c5dc_7eab8f1533db["test_KeepAlive()"]
  69511d36_cbb6_3cd3_c5dc_7eab8f1533db -->|calls| 4a65f9df_769d_214b_e196_3b450aa1375b
  4a3ed746_2618_717d_f666_83698afee601["testConnectionCloseHeaderHandledCorrectly()"]
  4a3ed746_2618_717d_f666_83698afee601 -->|calls| 4a65f9df_769d_214b_e196_3b450aa1375b
  15a8686a_c897_0b73_fdf2_d3a0fee49e7b["testConnectionCloseHeaderHandledCorrectlyForVoidPromise()"]
  15a8686a_c897_0b73_fdf2_d3a0fee49e7b -->|calls| 4a65f9df_769d_214b_e196_3b450aa1375b
  cbd740eb_89cf_330a_c97a_53914a54e207["testPipelineKeepAlive()"]
  cbd740eb_89cf_330a_c97a_53914a54e207 -->|calls| 4a65f9df_769d_214b_e196_3b450aa1375b
  style 4a65f9df_769d_214b_e196_3b450aa1375b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpServerKeepAliveHandlerTest.java lines 215–234

    private static void setupMessageLength(HttpResponse response, int setSelfDefinedMessageLength) {
        switch (setSelfDefinedMessageLength) {
        case NOT_SELF_DEFINED_MSG_LENGTH:
            if (isContentLengthSet(response)) {
                response.headers().remove(HttpHeaderNames.CONTENT_LENGTH);
            }
            break;
        case SET_RESPONSE_LENGTH:
            setContentLength(response, 0);
            break;
        case SET_CHUNKED:
            setTransferEncodingChunked(response, true);
            break;
        case SET_MULTIPART:
            response.headers().set(HttpHeaderNames.CONTENT_TYPE, MULTIPART_MIXED.toUpperCase());
            break;
        default:
            throw new IllegalArgumentException("selfDefinedMessageLength: " + setSelfDefinedMessageLength);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does setupMessageLength() do?
setupMessageLength() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpServerKeepAliveHandlerTest.java.
Where is setupMessageLength() defined?
setupMessageLength() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpServerKeepAliveHandlerTest.java at line 215.
What calls setupMessageLength()?
setupMessageLength() is called by 4 function(s): testConnectionCloseHeaderHandledCorrectly, testConnectionCloseHeaderHandledCorrectlyForVoidPromise, testPipelineKeepAlive, test_KeepAlive.

Analyze Your Own Codebase

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

Try Supermodel Free