Fix the websocket server example
Motivation: As report in #2953 the websocket server example contained a bug and did therefore not work with chrome: A websocket extension is added to the pipeline but extensions were disallowed in the handshaker and decoder, which is leading the decoder to closing the connection after receiving an extension frame. Modifications: Allow websocket extensions in the handshaker to correctly enable the extension. Result: Working websocket server example Fixes #2953
This commit is contained in:
parent
fce23b46a2
commit
b348a28c37
@ -94,7 +94,7 @@ public class WebSocketServerHandler extends SimpleChannelInboundHandler<Object>
|
|||||||
|
|
||||||
// Handshake
|
// Handshake
|
||||||
WebSocketServerHandshakerFactory wsFactory = new WebSocketServerHandshakerFactory(
|
WebSocketServerHandshakerFactory wsFactory = new WebSocketServerHandshakerFactory(
|
||||||
getWebSocketLocation(req), null, false);
|
getWebSocketLocation(req), null, true);
|
||||||
handshaker = wsFactory.newHandshaker(req);
|
handshaker = wsFactory.newHandshaker(req);
|
||||||
if (handshaker == null) {
|
if (handshaker == null) {
|
||||||
WebSocketServerHandshakerFactory.sendUnsupportedVersionResponse(ctx.channel());
|
WebSocketServerHandshakerFactory.sendUnsupportedVersionResponse(ctx.channel());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user