Home / Function/ testEncodeUsingBothStaticAndDynamicTable() — netty Function Reference

testEncodeUsingBothStaticAndDynamicTable() — netty Function Reference

Architecture documentation for the testEncodeUsingBothStaticAndDynamicTable() function in HpackEncoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  eea3cbdd_092d_ee1e_90b1_3bf1e7b07012["testEncodeUsingBothStaticAndDynamicTable()"]
  a8203e54_7e3c_740d_20fe_825ed86c66af["HpackEncoderTest"]
  eea3cbdd_092d_ee1e_90b1_3bf1e7b07012 -->|defined in| a8203e54_7e3c_740d_20fe_825ed86c66af
  9eb8fd89_0897_09d7_fe02_33bab5eb7d17["verifyEncoding()"]
  eea3cbdd_092d_ee1e_90b1_3bf1e7b07012 -->|calls| 9eb8fd89_0897_09d7_fe02_33bab5eb7d17
  style eea3cbdd_092d_ee1e_90b1_3bf1e7b07012 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/HpackEncoderTest.java lines 108–135

    @Test
    public void testEncodeUsingBothStaticAndDynamicTable() throws Http2Exception {
        final Http2Headers headers = new DefaultHttp2Headers()
          // :method -> POST is found in the static table.
          .add(":method", "POST")

          // ":path" is found in the static table but only matches "/" and "/index.html".
          .add(":path", "/dev/null")

          // "accept-language" is found in the static table, but with no matching value.
          .add("accept-language", "fr")

          // k -> x is not in the static table.
          .add("k", "x");

        // :method -> POST gets encoded by reference.
        // :path -> /dev/null
        //      :path gets encoded by reference, /dev/null literally.
        // accept-language -> fr
        //      accept-language gets encoded by reference, fr literally.
        // k -> x
        //      both k and x get encoded literally.
        verifyEncoding(headers,
          -125, 68, 9, 47, 100, 101, 118, 47, 110, 117, 108, 108, 81, 2, 102, 114, 64, 1, 107, 1, 120);

        // encoded using references to previous headers.
        verifyEncoding(headers, -125, -64, -65, -66);
    }

Domain

Subdomains

Frequently Asked Questions

What does testEncodeUsingBothStaticAndDynamicTable() do?
testEncodeUsingBothStaticAndDynamicTable() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/HpackEncoderTest.java.
Where is testEncodeUsingBothStaticAndDynamicTable() defined?
testEncodeUsingBothStaticAndDynamicTable() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/HpackEncoderTest.java at line 108.
What does testEncodeUsingBothStaticAndDynamicTable() call?
testEncodeUsingBothStaticAndDynamicTable() calls 1 function(s): verifyEncoding.

Analyze Your Own Codebase

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

Try Supermodel Free