[786] Fix possible corruption of first WebSocketFrame caused by WebSocketServerHandshaker*
This commit is contained in:
parent
15c67f87ff
commit
a52c5befe3
@ -194,7 +194,7 @@ public class WebSocketServerHandshaker00 extends WebSocketServerHandshaker {
|
||||
if (p.get(HttpChunkAggregator.class) != null) {
|
||||
p.remove(HttpChunkAggregator.class);
|
||||
}
|
||||
p.replace(HttpRequestDecoder.class, "wsdecoder",
|
||||
p.get(HttpRequestDecoder.class).replace("wsdecoder",
|
||||
new WebSocket00FrameDecoder(getMaxFramePayloadLength()));
|
||||
|
||||
p.replace(HttpResponseEncoder.class, "wsencoder", new WebSocket00FrameEncoder());
|
||||
|
@ -172,7 +172,7 @@ public class WebSocketServerHandshaker08 extends WebSocketServerHandshaker {
|
||||
p.remove(HttpChunkAggregator.class);
|
||||
}
|
||||
|
||||
p.replace(HttpRequestDecoder.class, "wsdecoder",
|
||||
p.get(HttpRequestDecoder.class).replace("wsdecoder",
|
||||
new WebSocket08FrameDecoder(true, allowExtensions, getMaxFramePayloadLength()));
|
||||
p.replace(HttpResponseEncoder.class, "wsencoder", new WebSocket08FrameEncoder(false));
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ public class WebSocketServerHandshaker13 extends WebSocketServerHandshaker {
|
||||
p.remove(HttpChunkAggregator.class);
|
||||
}
|
||||
|
||||
p.replace(HttpRequestDecoder.class, "wsdecoder",
|
||||
p.get(HttpRequestDecoder.class).replace("wsdecoder",
|
||||
new WebSocket13FrameDecoder(true, allowExtensions, getMaxFramePayloadLength()));
|
||||
p.replace(HttpResponseEncoder.class, "wsencoder", new WebSocket13FrameEncoder(false));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user