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
d59629377c
commit
a7a654c82f
@ -94,7 +94,7 @@ public class WebSocketServerHandler extends SimpleChannelInboundHandler<Object>
|
||||
|
||||
// Handshake
|
||||
WebSocketServerHandshakerFactory wsFactory = new WebSocketServerHandshakerFactory(
|
||||
getWebSocketLocation(req), null, false);
|
||||
getWebSocketLocation(req), null, true);
|
||||
handshaker = wsFactory.newHandshaker(req);
|
||||
if (handshaker == null) {
|
||||
WebSocketServerHandshakerFactory.sendUnsupportedVersionResponse(ctx.channel());
|
||||
|
Loading…
Reference in New Issue
Block a user