Fix for ACE-5608 SOLR 6 - Dynamic shard registration does not support secure sharding

- tested against SOLR4/6 sharded and unsharded

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@132995 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2016-11-22 10:25:23 +00:00
parent 8eacaef237
commit a514f96d30

View File

@@ -113,7 +113,10 @@ public class DynamicSolrStoreMappingWrapperFactory
if (builder.length() > 0)
{
builder.append(',');
}
}
Pair<String, Integer> key = new Pair<String, Integer>(instance.getHostName(), instance.getPort());
HttpClient client = clients.get(key);
builder.append(encoder.encode(client.getHostConfiguration().getProtocol().getScheme() + "://", "UTF-8"));
builder.append(encoder.encode(instance.getHostName(), "UTF-8"));
builder.append(':');
builder.append(encoder.encode("" + instance.getPort(), "UTF-8"));