On Thu, 2012-01-26 at 08:29 +0100, Marcin Bazydlo wrote: > Hi! > I have a proxy based on http components. We are currently upgrading it > to support ssl. We did fine on incoming part, but we are struggling with > the outgoing connections. We implemented both connections to SSL site > and to non-ssl site, but we would like to be able to handle both in one > reactor. Is it possible? What is the best way to do it? Currently, we > are thinking on implementing IOEventDispatcher which would (depending on > the connection port) pass requests to either Default or SSL implementation. > > I would be glad to hear any comments and suggestions. > > Best regards, > Marcin Bazydlo >
Marcin, Indeed, what you need is a custom IOEventDispatcher that is aware of SSL connections and that can handle differently than plain connections. I assume you are using HttpCore 4.1.x. If you do not want to upgrade to 4.2-beta1, you could borrow such implementation from SVN: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractIODispatch.java Hope this helps Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
