Skip to content

Commit

Permalink
Add decompression support to netty exec factory
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 4, 2018
1 parent 8907226 commit ce70de9
Showing 1 changed file with 4 additions and 0 deletions.
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 ce70de9

Please sign in to comment.