Home / Function/ specificConfigPrecedenceOverGeneric() — netty Function Reference

specificConfigPrecedenceOverGeneric() — netty Function Reference

Architecture documentation for the specificConfigPrecedenceOverGeneric() function in CorsHandlerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  0dfa489e_ed6b_4b37_d90c_062367cd0718["specificConfigPrecedenceOverGeneric()"]
  e946b2e4_b243_053e_5c0a_3d1a9a50042d["CorsHandlerTest"]
  0dfa489e_ed6b_4b37_d90c_062367cd0718 -->|defined in| e946b2e4_b243_053e_5c0a_3d1a9a50042d
  e60d18d8_fd23_cf06_216e_d68d84f411ae["assertValues()"]
  0dfa489e_ed6b_4b37_d90c_062367cd0718 -->|calls| e60d18d8_fd23_cf06_216e_d68d84f411ae
  style 0dfa489e_ed6b_4b37_d90c_062367cd0718 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/cors/CorsHandlerTest.java lines 473–492

    @Test
    public void specificConfigPrecedenceOverGeneric() {
        String host1 = "http://host1";
        String host2 = "http://host2";

        CorsConfig forHost1 = forOrigin(host1).allowedRequestMethods(HttpMethod.GET).maxAge(3600L).build();
        CorsConfig allowAll = forAnyOrigin().allowedRequestMethods(HttpMethod.POST, HttpMethod.GET, HttpMethod.OPTIONS)
                .maxAge(1800).build();

        List<CorsConfig> rules = Arrays.asList(forHost1, allowAll);

        final HttpResponse host1Response = preflightRequest(rules, host1, "", false);
        assertEquals("GET", host1Response.headers().get(ACCESS_CONTROL_ALLOW_METHODS));
        assertEquals("3600", host1Response.headers().getAsString(ACCESS_CONTROL_MAX_AGE));

        final HttpResponse host2Response = preflightRequest(rules, host2, "", false);
        assertValues(host2Response, ACCESS_CONTROL_ALLOW_METHODS.toString(), "POST", "GET", "OPTIONS");
        assertEquals("*", host2Response.headers().getAsString(ACCESS_CONTROL_ALLOW_ORIGIN));
        assertEquals("1800", host2Response.headers().getAsString(ACCESS_CONTROL_MAX_AGE));
    }

Domain

Subdomains

Frequently Asked Questions

What does specificConfigPrecedenceOverGeneric() do?
specificConfigPrecedenceOverGeneric() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/cors/CorsHandlerTest.java.
Where is specificConfigPrecedenceOverGeneric() defined?
specificConfigPrecedenceOverGeneric() is defined in codec-http/src/test/java/io/netty/handler/codec/http/cors/CorsHandlerTest.java at line 473.
What does specificConfigPrecedenceOverGeneric() call?
specificConfigPrecedenceOverGeneric() calls 1 function(s): assertValues.

Analyze Your Own Codebase

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

Try Supermodel Free