Home / Function/ preflightNonEmptyLastForwarded() — netty Function Reference

preflightNonEmptyLastForwarded() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  ce30f42d_0132_189f_f952_8effe9dbc852["preflightNonEmptyLastForwarded()"]
  e946b2e4_b243_053e_5c0a_3d1a9a50042d["CorsHandlerTest"]
  ce30f42d_0132_189f_f952_8effe9dbc852 -->|defined in| e946b2e4_b243_053e_5c0a_3d1a9a50042d
  style ce30f42d_0132_189f_f952_8effe9dbc852 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/cors/CorsHandlerTest.java lines 588–608

    @Test
    public void preflightNonEmptyLastForwarded() {
        CorsConfig config = forOrigin("http://allowed").build();
        EmbeddedChannel ch = new EmbeddedChannel(new CorsHandler(config));

        FullHttpRequest preflight = new DefaultFullHttpRequest(HTTP_1_1, OPTIONS, "/x");
        preflight.headers().set(ORIGIN, "http://allowed");
        preflight.headers().set(ACCESS_CONTROL_REQUEST_METHOD, "GET");

        assertFalse(ch.writeInbound(preflight));
        Object outbound = ch.releaseOutbound();
        assertNotNull(outbound);

        LastHttpContent nonEmpty = new DefaultLastHttpContent(Unpooled.copiedBuffer("x", CharsetUtil.UTF_8));
        assertFalse(ch.writeInbound(nonEmpty));

        Object inbound = ch.readInbound();
        assertNull(inbound);

        assertFalse(ch.finish());
    }

Domain

Subdomains

Frequently Asked Questions

What does preflightNonEmptyLastForwarded() do?
preflightNonEmptyLastForwarded() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/cors/CorsHandlerTest.java.
Where is preflightNonEmptyLastForwarded() defined?
preflightNonEmptyLastForwarded() is defined in codec-http/src/test/java/io/netty/handler/codec/http/cors/CorsHandlerTest.java at line 588.

Analyze Your Own Codebase

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

Try Supermodel Free