From ae909f5d12ebce4f9e70e20371b91005e2955d0f Mon Sep 17 00:00:00 2001 From: Ngoc Dao Date: Tue, 9 Oct 2012 14:30:15 +0900 Subject: [PATCH 1/2] Uncomment the following line if you want HTTPS: add missing imports --- .../http/file/HttpStaticFileServerPipelineFactory.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/jboss/netty/example/http/file/HttpStaticFileServerPipelineFactory.java b/src/main/java/org/jboss/netty/example/http/file/HttpStaticFileServerPipelineFactory.java index e274c179d7..35689837c3 100644 --- a/src/main/java/org/jboss/netty/example/http/file/HttpStaticFileServerPipelineFactory.java +++ b/src/main/java/org/jboss/netty/example/http/file/HttpStaticFileServerPipelineFactory.java @@ -24,6 +24,11 @@ import org.jboss.netty.handler.codec.http.HttpRequestDecoder; import org.jboss.netty.handler.codec.http.HttpResponseEncoder; import org.jboss.netty.handler.stream.ChunkedWriteHandler; +// Uncomment the following line if you want HTTPS +//import javax.net.ssl.SSLEngine; +//import org.jboss.netty.example.securechat.SecureChatSslContextFactory; +//import org.jboss.netty.handler.ssl.SslHandler; + public class HttpStaticFileServerPipelineFactory implements ChannelPipelineFactory { public ChannelPipeline getPipeline() throws Exception { // Create a default pipeline implementation. From fb5e199d9e9af391f364801ce6ff97b5003aed37 Mon Sep 17 00:00:00 2001 From: Ngoc Dao Date: Tue, 9 Oct 2012 14:33:12 +0900 Subject: [PATCH 2/2] Uncomment the following lines if you want HTTPS --- .../http/file/HttpStaticFileServerPipelineFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jboss/netty/example/http/file/HttpStaticFileServerPipelineFactory.java b/src/main/java/org/jboss/netty/example/http/file/HttpStaticFileServerPipelineFactory.java index 35689837c3..01a9d88949 100644 --- a/src/main/java/org/jboss/netty/example/http/file/HttpStaticFileServerPipelineFactory.java +++ b/src/main/java/org/jboss/netty/example/http/file/HttpStaticFileServerPipelineFactory.java @@ -24,7 +24,7 @@ import org.jboss.netty.handler.codec.http.HttpRequestDecoder; import org.jboss.netty.handler.codec.http.HttpResponseEncoder; import org.jboss.netty.handler.stream.ChunkedWriteHandler; -// Uncomment the following line if you want HTTPS +// Uncomment the following lines if you want HTTPS //import javax.net.ssl.SSLEngine; //import org.jboss.netty.example.securechat.SecureChatSslContextFactory; //import org.jboss.netty.handler.ssl.SslHandler; @@ -34,7 +34,7 @@ public class HttpStaticFileServerPipelineFactory implements ChannelPipelineFacto // Create a default pipeline implementation. ChannelPipeline pipeline = pipeline(); - // Uncomment the following line if you want HTTPS + // Uncomment the following lines if you want HTTPS //SSLEngine engine = SecureChatSslContextFactory.getServerContext().createSSLEngine(); //engine.setUseClientMode(false); //pipeline.addLast("ssl", new SslHandler(engine));