Skip to content

Commit

Permalink
Add decompression support to netty exec factory (#817)
Browse files Browse the repository at this point in the history
Fixes problem with gzip encoded streams (e.g. copy file from container)
  • Loading branch information
rnorth committed Aug 5, 2018
1 parent 834b19f commit 9d6d6bb
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,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.ssl.SslHandler;
import io.netty.handler.timeout.IdleState;
import io.netty.handler.timeout.IdleStateEvent;
Expand Down Expand Up @@ -135,6 +136,7 @@ public EventLoopGroup epollGroup() {
@Override
protected void initChannel(final UnixChannel channel) throws Exception {
channel.pipeline().addLast(new HttpClientCodec());
channel.pipeline().addLast(new HttpContentDecompressor());
}
});
return epollEventLoopGroup;
Expand All @@ -148,6 +150,7 @@ public EventLoopGroup kqueueGroup() {
@Override
protected void initChannel(final KQueueDomainSocketChannel channel) throws Exception {
channel.pipeline().addLast(new HttpClientCodec());
channel.pipeline().addLast(new HttpContentDecompressor());
}
});

Expand Down Expand Up @@ -175,6 +178,7 @@ public EventLoopGroup init(Bootstrap bootstrap, final DockerClientConfig dockerC
@Override
protected void initChannel(final SocketChannel channel) throws Exception {
channel.pipeline().addLast(new HttpClientCodec());
channel.pipeline().addLast(new HttpContentDecompressor());
}
});

Expand Down

0 comments on commit 9d6d6bb

Please sign in to comment.