You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2016/06/16 12:09:15 UTC

[45/50] [abbrv] lucene-solr:apiv2: SOLR-8048: bin/solr script should support basic auth credentials provided in solr.in.sh

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


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/2e101c42
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/2e101c42
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/2e101c42

Branch: refs/heads/apiv2
Commit: 2e101c42ca6c6a4e03cf3a1ab1010f5995dccd88
Parents: ccf2070
Author: Noble Paul <no...@apache.org>
Authored: Tue Jun 14 19:43:48 2016 +0530
Committer: Noble Paul <no...@apache.org>
Committed: Tue Jun 14 19:43:48 2016 +0530

----------------------------------------------------------------------
 solr/core/src/java/org/apache/solr/util/SolrCLI.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2e101c42/solr/core/src/java/org/apache/solr/util/SolrCLI.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/util/SolrCLI.java b/solr/core/src/java/org/apache/solr/util/SolrCLI.java
index 02f8d5a..5e6908a 100644
--- a/solr/core/src/java/org/apache/solr/util/SolrCLI.java
+++ b/solr/core/src/java/org/apache/solr/util/SolrCLI.java
@@ -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)));
         });
       }