SSLEngine engine = SslContextFactory.getServerContext().createSSLEngine();
engine.setUseClientMode(false);
pipeline.addLast("ssl", new SslHandler(engine));
}
pipeline.addLast("decoder", new HttpRequestDecoder());
pipeline.addLast("aggregator", new HttpChunkAggregator(1048576));
pipeline.addLast("encoder", new HttpResponseEncoder());
// Remove the following line if you don't want automatic content compression.
//pipeline.addLast("deflater", new HttpContentCompressor());
pipeline.addLast("handler", new HttpServerHandler(getHandler, fileReceiver, homeUrl));