Home / Function/ preflightSecondEmptyLastForwardedAfterFirstDiscard() — netty Function Reference

preflightSecondEmptyLastForwardedAfterFirstDiscard() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/cors/CorsHandlerTest.java lines 543–564

    @Test
    public void preflightSecondEmptyLastForwardedAfterFirstDiscard() {
        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 = LastHttpContent.EMPTY_LAST_CONTENT;

        assertFalse(ch.writeInbound(first));

        assertFalse(ch.writeInbound(second));

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

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free