Home / Function/ testCheckInvalidWebSocketPath() — netty Function Reference

testCheckInvalidWebSocketPath() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  f7db3d74_d600_26b2_58d7_6d4d1832dedf["testCheckInvalidWebSocketPath()"]
  7afc952d_7109_096b_f81d_bf3293e37581["WebSocketServerProtocolHandlerTest"]
  f7db3d74_d600_26b2_58d7_6d4d1832dedf -->|defined in| 7afc952d_7109_096b_f81d_bf3293e37581
  80f33c2c_3b4b_5696_fbad_e6b9f93bb80d["EmbeddedChannel()"]
  f7db3d74_d600_26b2_58d7_6d4d1832dedf -->|calls| 80f33c2c_3b4b_5696_fbad_e6b9f93bb80d
  style f7db3d74_d600_26b2_58d7_6d4d1832dedf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java lines 274–299

    @Test
    public void testCheckInvalidWebSocketPath() {
        HttpRequest httpRequest = new WebSocketRequestBuilder().httpVersion(HTTP_1_1)
                .method(HttpMethod.GET)
                .uri("/testabc")
                .key(HttpHeaderNames.SEC_WEBSOCKET_KEY)
                .connection("Upgrade")
                .upgrade(HttpHeaderValues.WEBSOCKET)
                .version13()
                .build();

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

        EmbeddedChannel ch = new EmbeddedChannel(
                new WebSocketServerProtocolHandler(config),
                new HttpRequestDecoder(),
                new HttpResponseEncoder(),
                new MockOutboundHandler());
        ch.writeInbound(httpRequest);

        ChannelHandlerContext handshakerCtx = ch.pipeline().context(WebSocketServerProtocolHandshakeHandler.class);
        assertNull(WebSocketServerProtocolHandler.getHandshaker(handshakerCtx.channel()));
    }

Domain

Subdomains

Frequently Asked Questions

What does testCheckInvalidWebSocketPath() do?
testCheckInvalidWebSocketPath() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java.
Where is testCheckInvalidWebSocketPath() defined?
testCheckInvalidWebSocketPath() is defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java at line 274.
What does testCheckInvalidWebSocketPath() call?
testCheckInvalidWebSocketPath() calls 1 function(s): EmbeddedChannel.

Analyze Your Own Codebase

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

Try Supermodel Free