- All Implemented Interfaces:
- Closeable, AutoCloseable, org.apache.http.conn.HttpClientConnectionManager, org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>
public class SniPoolingHttpClientConnectionManager
extends org.apache.http.impl.conn.PoolingHttpClientConnectionManager
Class to work around the exception thrown by the SSL subsystem when the server is incorrectly
configured for SNI. In this case, it may return a warning: "handshake alert: unrecognized_name".
Browsers usually ignore this warning, while Java SSL throws an exception.
This class extends the PoolingHttpClientConnectionManager to catch this exception and retry
without
the configured hostname, effectively disabling the SNI for this host.
Based on the code provided by Ivan Shcheklein, available at:
http://stackoverflow.com/questions/7615645/ssl-handshake-alert-unrecognized-name-error-since
-upgrade-to-java-1-7-0/28571582#28571582