Skip to content

Commit 378805c

Browse files
author
Stephane Landelle
committed
Handle Continuation frames, close #674
1 parent b0ec741 commit 378805c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/ChannelManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import io.netty.handler.codec.http.HttpContentDecompressor;
3030
import io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder;
3131
import io.netty.handler.codec.http.websocketx.WebSocket08FrameEncoder;
32+
import io.netty.handler.codec.http.websocketx.WebSocketFrameAggregator;
3233
import io.netty.handler.ssl.SslHandler;
3334
import io.netty.handler.stream.ChunkedWriteHandler;
3435
import io.netty.util.Timer;
@@ -70,6 +71,7 @@ public class ChannelManager {
7071
public static final String INFLATER_HANDLER = "inflater";
7172
public static final String CHUNKED_WRITER_HANDLER = "chunkedWriter";
7273
public static final String WS_DECODER_HANDLER = "ws-decoder";
74+
public static final String WS_FRAME_AGGREGATOR = "ws-aggregator";
7375
public static final String WS_ENCODER_HANDLER = "ws-encoder";
7476

7577
private final AsyncHttpClientConfig config;
@@ -421,6 +423,7 @@ public void upgradePipelineForWebSockets(ChannelPipeline pipeline) {
421423
pipeline.addAfter(HTTP_HANDLER, WS_ENCODER_HANDLER, new WebSocket08FrameEncoder(true));
422424
pipeline.remove(HTTP_HANDLER);
423425
pipeline.addBefore(WS_PROCESSOR, WS_DECODER_HANDLER, new WebSocket08FrameDecoder(false, false, 10 * 1024));
426+
pipeline.addAfter(WS_DECODER_HANDLER, WS_FRAME_AGGREGATOR, new WebSocketFrameAggregator(10 * 1024));
424427
}
425428

426429
public final Callback newDrainCallback(final NettyResponseFuture<?> future, final Channel channel, final boolean keepAlive, final String poolKey) {

0 commit comments

Comments
 (0)