location += "/" + core;
}
// Initialize standard solr-j.
// First, we need an HttpClient where basic auth is properly set up.
PoolingClientConnectionManager localConnectionManager = new PoolingClientConnectionManager();
localConnectionManager.setMaxTotal(1);
SSLSocketFactory myFactory;
if (keystoreManager != null)
{
myFactory = new SSLSocketFactory(keystoreManager.getSecureSocketFactory(),
new AllowAllHostnameVerifier());
}
else
{
// Use the "trust everything" one
myFactory = new SSLSocketFactory(KeystoreManagerFactory.getTrustingSecureSocketFactory(),
new AllowAllHostnameVerifier());
}
Scheme myHttpsProtocol = new Scheme("https", 443, myFactory);
localConnectionManager.getSchemeRegistry().register(myHttpsProtocol);
connectionManager = localConnectionManager;
BasicHttpParams params = new BasicHttpParams();
// This one is essential to prevent us from reading from the content stream before necessary during auth, but
// is incompatible with some proxies.