From afa5df6bf01c50045194832785803f515b124ffe Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Sat, 19 Oct 2013 20:53:57 +0200 Subject: [PATCH] [#1933] Correctly add the wsencoder before the httpencoder as the httpencoder also handle ByteBuf --- .../codec/http/websocketx/WebSocketServerHandshaker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java index 80e2bee6bb..22c8198d8e 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java @@ -183,7 +183,7 @@ public abstract class WebSocketServerHandshaker { p.replace(ctx.name(), "wsdecoder", newWebsocketDecoder()); encoderName = p.context(HttpResponseEncoder.class).name(); - p.addAfter(encoderName, "wsencoder", newWebSocketEncoder()); + p.addBefore(encoderName, "wsencoder", newWebSocketEncoder()); } channel.writeAndFlush(response).addListener(new ChannelFutureListener() { @Override