Home / Function/ preflightSecondNonEmptyLastDiscarded() — netty Function Reference

preflightSecondNonEmptyLastDiscarded() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/cors/CorsHandlerTest.java lines 566–586

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

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

        assertFalse(ch.writeInbound(preflight));
        ReferenceCountUtil.release(ch.readOutbound());

        LastHttpContent first = LastHttpContent.EMPTY_LAST_CONTENT;
        LastHttpContent second = new DefaultLastHttpContent(
                Unpooled.copiedBuffer("test message", CharsetUtil.UTF_8));

        assertFalse(ch.writeInbound(first));
        assertFalse(ch.writeInbound(second));
        assertNull(ch.readInbound());
        assertFalse(ch.finish());
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free