Home / Function/ testCheckWebSocketPathStartWithSlash() — netty Function Reference

testCheckWebSocketPathStartWithSlash() — netty Function Reference

Architecture documentation for the testCheckWebSocketPathStartWithSlash() function in WebSocketServerProtocolHandlerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  efaee56c_a4ba_56bf_fab7_4caa5e94692f["testCheckWebSocketPathStartWithSlash()"]
  7afc952d_7109_096b_f81d_bf3293e37581["WebSocketServerProtocolHandlerTest"]
  efaee56c_a4ba_56bf_fab7_4caa5e94692f -->|defined in| 7afc952d_7109_096b_f81d_bf3293e37581
  style efaee56c_a4ba_56bf_fab7_4caa5e94692f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java lines 214–244

    @Test
    public void testCheckWebSocketPathStartWithSlash() {
        WebSocketRequestBuilder builder = new WebSocketRequestBuilder().httpVersion(HTTP_1_1)
                .method(HttpMethod.GET)
                .key(HttpHeaderNames.SEC_WEBSOCKET_KEY)
                .connection("Upgrade")
                .upgrade(HttpHeaderValues.WEBSOCKET)
                .version13();

        WebSocketServerProtocolConfig config = WebSocketServerProtocolConfig.newBuilder()
                .websocketPath("/")
                .checkStartsWith(true)
                .build();

        FullHttpResponse response;

        createChannel(config, null).writeInbound(builder.uri("/test").build());
        response = responses.remove();
        assertEquals(SWITCHING_PROTOCOLS, response.status());
        response.release();

        createChannel(config, null).writeInbound(builder.uri("/?q=v").build());
        response = responses.remove();
        assertEquals(SWITCHING_PROTOCOLS, response.status());
        response.release();

        createChannel(config, null).writeInbound(builder.uri("/").build());
        response = responses.remove();
        assertEquals(SWITCHING_PROTOCOLS, response.status());
        response.release();
    }

Domain

Subdomains

Frequently Asked Questions

What does testCheckWebSocketPathStartWithSlash() do?
testCheckWebSocketPathStartWithSlash() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java.
Where is testCheckWebSocketPathStartWithSlash() defined?
testCheckWebSocketPathStartWithSlash() is defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java at line 214.

Analyze Your Own Codebase

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

Try Supermodel Free