Search in sources :

Example 76 with HttpServerCodec

use of io.netty.handler.codec.http.HttpServerCodec in project reactor-netty by reactor.

the class ConnectionTest method addNonByteDecoderWhenNoRight.

@Test
void addNonByteDecoderWhenNoRight() {
    channel.pipeline().addLast(NettyPipeline.HttpCodec, new HttpServerCodec());
    testContext.addHandlerLast(DECODER_NAME, decoder);
    assertThat(channel.pipeline().names()).containsExactly(NettyPipeline.HttpCodec, DECODER_NAME, TAIL_CONTEXT_NAME);
}
Also used : HttpServerCodec(io.netty.handler.codec.http.HttpServerCodec) Test(org.junit.jupiter.api.Test)

Example 77 with HttpServerCodec

use of io.netty.handler.codec.http.HttpServerCodec in project reactor-netty by reactor.

the class ConnectionTest method addByteEncoderWhenNoRight.

@Test
void addByteEncoderWhenNoRight() {
    channel.pipeline().addLast(NettyPipeline.HttpCodec, new HttpServerCodec());
    testContext.addHandlerFirst(ENCODER_NAME, encoder);
    assertThat(channel.pipeline().names()).containsExactly(NettyPipeline.HttpCodec, ENCODER_NAME, TAIL_CONTEXT_NAME);
}
Also used : HttpServerCodec(io.netty.handler.codec.http.HttpServerCodec) Test(org.junit.jupiter.api.Test)

Aggregations

HttpServerCodec (io.netty.handler.codec.http.HttpServerCodec)75 ChannelPipeline (io.netty.channel.ChannelPipeline)41 HttpObjectAggregator (io.netty.handler.codec.http.HttpObjectAggregator)35 ChannelHandler (io.netty.channel.ChannelHandler)13 ChannelHandlerContext (io.netty.channel.ChannelHandlerContext)13 ChunkedWriteHandler (io.netty.handler.stream.ChunkedWriteHandler)12 Test (org.junit.jupiter.api.Test)12 HttpServerUpgradeHandler (io.netty.handler.codec.http.HttpServerUpgradeHandler)11 Test (org.junit.Test)11 ServerBootstrap (io.netty.bootstrap.ServerBootstrap)10 LineBasedFrameDecoder (io.netty.handler.codec.LineBasedFrameDecoder)10 Channel (io.netty.channel.Channel)9 NioServerSocketChannel (io.netty.channel.socket.nio.NioServerSocketChannel)9 NioEventLoopGroup (io.netty.channel.nio.NioEventLoopGroup)8 EmbeddedChannel (io.netty.channel.embedded.EmbeddedChannel)7 WebSocketServerProtocolHandler (io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler)7 IdleStateHandler (io.netty.handler.timeout.IdleStateHandler)7 ChannelDuplexHandler (io.netty.channel.ChannelDuplexHandler)6 ChannelHandlerAdapter (io.netty.channel.ChannelHandlerAdapter)6 SocketChannel (io.netty.channel.socket.SocketChannel)6