Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

Commit

Permalink
Allow netty to handle compressed response bodies
Browse files Browse the repository at this point in the history
  • Loading branch information
rnorth authored and Richard North committed Aug 12, 2018
1 parent cdea15b commit 39d02d8
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -39,6 +39,7 @@
import io.netty.channel.unix.DomainSocketAddress;
import io.netty.channel.unix.UnixChannel;
import io.netty.handler.codec.http.HttpClientCodec;
import io.netty.handler.codec.http.HttpContentDecompressor;
import io.netty.handler.logging.LoggingHandler;
import io.netty.handler.ssl.SslHandler;
import io.netty.handler.timeout.IdleState;
Expand Down Expand Up @@ -158,6 +159,7 @@ public EpollDomainSocketChannel newChannel() {
@Override
protected void initChannel(final UnixChannel channel) throws Exception {
channel.pipeline().addLast(new HttpClientCodec());
channel.pipeline().addLast(new HttpContentDecompressor());
}
});
return epollEventLoopGroup;
Expand All @@ -172,6 +174,7 @@ public EventLoopGroup kqueueGroup() {
protected void initChannel(final KQueueDomainSocketChannel channel) throws Exception {
channel.pipeline().addLast(new LoggingHandler(getClass()));
channel.pipeline().addLast(new HttpClientCodec());
channel.pipeline().addLast(new HttpContentDecompressor());
}
});

Expand Down Expand Up @@ -212,6 +215,7 @@ protected void initChannel(final SocketChannel channel) throws Exception {
// channel.pipeline().addLast(new
// HttpProxyHandler(proxyAddress));
channel.pipeline().addLast(new HttpClientCodec());
channel.pipeline().addLast(new HttpContentDecompressor());
}
});

Expand Down

0 comments on commit 39d02d8

Please sign in to comment.