SOLR-8048: bin/solr script should support basic auth credentials provided in solr.in.sh

This commit is contained in:
Noble Paul 2016-06-14 19:43:48 +05:30
parent ccf2070e53
commit 2e101c42ca
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ public class SolrCLI {
HttpClientUtil.addRequestInterceptor((httpRequest, httpContext) -> {
String pair = ss.get(0) + ":" + ss.get(1);
byte[] encodedBytes = Base64.encodeBase64(pair.getBytes());
byte[] encodedBytes = Base64.encodeBase64(pair.getBytes(StandardCharsets.UTF_8));
httpRequest.addHeader(new BasicHeader("Authorization", "Basic "+ new String(encodedBytes)));
});
}