Home / Function/ testDowngradeHeaders() — netty Function Reference

testDowngradeHeaders() — netty Function Reference

Architecture documentation for the testDowngradeHeaders() function in Http2StreamFrameToHttpObjectCodecTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  3d26536d_6afc_7a85_90d5_6ce631251f20["testDowngradeHeaders()"]
  f77629dd_309f_f368_8220_46ddc65ad871["Http2StreamFrameToHttpObjectCodecTest"]
  3d26536d_6afc_7a85_90d5_6ce631251f20 -->|defined in| f77629dd_309f_f368_8220_46ddc65ad871
  style 3d26536d_6afc_7a85_90d5_6ce631251f20 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/Http2StreamFrameToHttpObjectCodecTest.java lines 289–307

    @Test
    public void testDowngradeHeaders() throws Exception {
        EmbeddedChannel ch = new EmbeddedChannel(new Http2StreamFrameToHttpObjectCodec(true));
        Http2Headers headers = new DefaultHttp2Headers();
        headers.path("/");
        headers.method("GET");

        assertTrue(ch.writeInbound(new DefaultHttp2HeadersFrame(headers)));

        HttpRequest request = ch.readInbound();
        assertEquals("/", request.uri());
        assertEquals(HttpMethod.GET, request.method());
        assertEquals(HttpVersion.HTTP_1_1, request.protocolVersion());
        assertThat(request).isNotInstanceOf(FullHttpRequest.class);
        assertTrue(HttpUtil.isTransferEncodingChunked(request));

        assertNull(ch.readInbound());
        assertFalse(ch.finish());
    }

Domain

Subdomains

Frequently Asked Questions

What does testDowngradeHeaders() do?
testDowngradeHeaders() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2StreamFrameToHttpObjectCodecTest.java.
Where is testDowngradeHeaders() defined?
testDowngradeHeaders() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2StreamFrameToHttpObjectCodecTest.java at line 289.

Analyze Your Own Codebase

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

Try Supermodel Free