AsyncHttpClient/async-http-client — pull request #168 by jroper (2012-11-27 00:39:27+00:00)
Title: Fixed nonProxyHosts handling for SSL hosts

When connecting to an HTTPS host that matches a configured nonProxyHost, both the grizzly and the netty providers do the following things wrong:

* They make a non SSL connection direct to the target host, instead of making an SSL connection
* They attempt to make an CONNECT request, and if it succeeds (which it usually won't because they aren't using SSL and the host is an HTTPS host) they attempt to tunnel a second HTTP request as if they are using a proxy

This fix ensures that an HTTPS connection is used, and ensures that no CONNECT tunnelling is done in this situation.

Consequently it also affects HTTP nonProxyHost handling, in that requests matching a nonProxyHost made to HTTP hosts use a URI relative to the host, rather than an absolute http://hostname/path host.