engine.setUseClientMode(true);
pipeline.addLast("ssl", new SslHandler(engine));
}
pipeline.addLast("http-codec", new HttpClientCodec(maxInitialLineLength, maxChunkSize, maxChunkSize));
if (compress) {
pipeline.addLast("decompressor", new HttpContentDecompressor());
}
pipeline.addLast("handler", handler);
}