From 4e38601baf8bcd629be67041c331fa79f1e8e978 Mon Sep 17 00:00:00 2001 From: Shalin Shekhar Mangar Date: Sun, 16 Mar 2014 03:28:44 +0000 Subject: [PATCH] SOLR-5866: UpdateShardHandler needs to use the system default scheme registry to properly handle https via javax.net.ssl.* properties git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1577971 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 3 +++ .../src/java/org/apache/solr/update/UpdateShardHandler.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index f837738b34f..a7fc4d05773 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -175,6 +175,9 @@ Bug Fixes * SOLR-5867: OverseerCollectionProcessor isn't properly generating https urls in some cases. (Steve Davids via shalin) +* SOLR-5866: UpdateShardHandler needs to use the system default scheme registry to + properly handle https via javax.net.ssl.* properties. (Steve Davids via shalin) + Optimizations ---------------------- * SOLR-1880: Distributed Search skips GET_FIELDS stage if EXECUTE_QUERY diff --git a/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java b/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java index a36a8e6fb03..01008620436 100644 --- a/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java +++ b/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java @@ -23,6 +23,7 @@ import java.util.concurrent.Executors; import org.apache.http.client.HttpClient; import org.apache.http.conn.ClientConnectionManager; import org.apache.http.impl.conn.PoolingClientConnectionManager; +import org.apache.http.impl.conn.SchemeRegistryFactory; import org.apache.solr.client.solrj.impl.HttpClientUtil; import org.apache.solr.common.SolrException; import org.apache.solr.common.params.ModifiableSolrParams; @@ -45,7 +46,7 @@ public class UpdateShardHandler { public UpdateShardHandler(ConfigSolr cfg) { - clientConnectionManager = new PoolingClientConnectionManager(); + clientConnectionManager = new PoolingClientConnectionManager(SchemeRegistryFactory.createSystemDefault()); clientConnectionManager.setMaxTotal(cfg.getMaxUpdateConnections()); clientConnectionManager.setDefaultMaxPerRoute(cfg.getMaxUpdateConnectionsPerHost());