HTTPS handling in Netty
ups
handsome.ups at gmail.com
Thu Sep 22 04:34:17 EDT 2011
Actually all I want is to receive the response from server when sending
request of such type:
CONNECT www.google.com:443 HTTP/1.1
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20100101
Firefox/7.0
Proxy-Connection: keep-alive
Host: www.google.com
Here is my code:
ClientBootstrap bootstrap = new ClientBootstrap(factory);
bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
public ChannelPipeline getPipeline() throws Exception {
return Channels.pipeline(new HttpResponseDecoder(), new
HttpChunkAggregator(Integer.MAX_VALUE),
new HttpRequestEncoder(), new
ResponseHandler(container));
}
}
});
ChannelFuture channelFuture = bootstrap.connect(new
InetSocketAddress(host, port));
channelFuture.addListener(new ChannelFutureListener() {
public void operationComplete(ChannelFuture future) throws
Exception {
future.getChannel().write(container.getRequest());
}
});
--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/HTTPS-handling-in-Netty-tp6815990p6819366.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list