question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Websocket checkStartsWith doesn't work as expected

See original GitHub issue

Expected behavior

The websocket checkStartsWith (#10583) feature should support all of the following URLs:

  • /
  • /?param
  • /subPath
  • /subPath?param

Actual behavior

No matter whether you set it to true/false it only supports the websocket path itself with:

  • /
  • /?param

Steps to reproduce

Modify the websocket server example to set this config param?

Minimal yet complete reproducer code (or URL to code)

https://github.com/netty/netty/blob/4.1/example/src/main/java/io/netty/example/http/websocketx/server/WebSocketServerInitializer.java

change applicable line to:

pipeline.addLast(new WebSocketServerProtocolHandler(WEBSOCKET_PATH, null, true, 65555, false, true));

// and also test

pipeline.addLast(new WebSocketServerProtocolHandler(WEBSOCKET_PATH, null, true, 65555, false, false));

Netty version

4.1.53.Final

JVM version (e.g. java -version)

JDK 11

OS version (e.g. uname -a)

10.14.x

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
travishaagencommented, Nov 30, 2020

Verified fix with 4.1.54.Final release. Thank you for taking a look @Doyuni

0reactions
travishaagencommented, Nov 26, 2020

Apologies for the delay. Please give me a chance to verify on Monday, after the US holiday.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The get-entities doesn't check if the properties exists before ...
Is there an existing issue for this? I have searched the existing issues Describe the bug The get-entities doesn't check if the properties ......
Read more >
PHP WebSocket doesn't connect - Stack Overflow
I'm using Ratchet to create a PHP WebSocket connection. On my localhost it's working normally and as expected, but when I upload it...
Read more >
25. WebSocket Support - Spring
The WebSocket protocol defines two types of messages, text and binary, but their content is undefined. It's expected that the client and server...
Read more >
Websockets: timeout doesn't cause closing of incoming and ...
I'm developing network App using Ktor 1.2.5 and Kotlin 1.3.61 in Android 8. When netty websocket server's wifi is turned off by manually...
Read more >
An Introduction to WebSockets - Kodeco
Creating a WebSocket Server. A WebSocket connection starts with a handshake. This is a little dance the client and server do to start...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found