preflightEmptyLastDiscarded() — netty Function Reference
Architecture documentation for the preflightEmptyLastDiscarded() function in CorsHandlerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 27f7d42e_e8df_6ac5_3a24_98ca4e1a8cef["preflightEmptyLastDiscarded()"] e946b2e4_b243_053e_5c0a_3d1a9a50042d["CorsHandlerTest"] 27f7d42e_e8df_6ac5_3a24_98ca4e1a8cef -->|defined in| e946b2e4_b243_053e_5c0a_3d1a9a50042d style 27f7d42e_e8df_6ac5_3a24_98ca4e1a8cef fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/cors/CorsHandlerTest.java lines 520–541
@Test
public void preflightEmptyLastDiscarded() {
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));
Object outbound = ch.readOutbound();
assertNotNull(outbound); // preflight response
LastHttpContent lastHttpContent = LastHttpContent.EMPTY_LAST_CONTENT;
assertFalse(ch.writeInbound(lastHttpContent));
// Nothing should have been forwarded
assertNull(ch.readInbound());
assertFalse(ch.finish());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does preflightEmptyLastDiscarded() do?
preflightEmptyLastDiscarded() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/cors/CorsHandlerTest.java.
Where is preflightEmptyLastDiscarded() defined?
preflightEmptyLastDiscarded() is defined in codec-http/src/test/java/io/netty/handler/codec/http/cors/CorsHandlerTest.java at line 520.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free