lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject lucene-solr:master: SOLR-9399: Delete requests do not send credentials & fails for Basic Authentication
Date Mon, 02 Apr 2018 16:20:32 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master 805438c59 -> d2cb6adde


SOLR-9399: Delete requests do not send credentials & fails for Basic Authentication


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

Branch: refs/heads/master
Commit: d2cb6adde9ef1b3d6599cb39de0285e86611bef0
Parents: 805438c
Author: Erick <erick@apache.org>
Authored: Mon Apr 2 09:17:02 2018 -0700
Committer: Erick <erick@apache.org>
Committed: Mon Apr 2 09:17:02 2018 -0700

----------------------------------------------------------------------
 .../src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java | 1 +
 .../java/org/apache/solr/client/solrj/request/UpdateRequest.java    | 1 +
 2 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d2cb6add/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
index 17b64ab..34d789f 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
@@ -588,6 +588,7 @@ public class CloudSolrClient extends SolrClient {
         nonRoutableRequest = new UpdateRequest();
       }
       nonRoutableRequest.setParams(nonRoutableParams);
+      nonRoutableRequest.setBasicAuthCredentials(request.getBasicAuthUser(), request.getBasicAuthPassword());
       List<String> urlList = new ArrayList<>();
       urlList.addAll(routes.keySet());
       Collections.shuffle(urlList, rand);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d2cb6add/solr/solrj/src/java/org/apache/solr/client/solrj/request/UpdateRequest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/UpdateRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/UpdateRequest.java
index 0d9867c..d4da965 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/UpdateRequest.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/UpdateRequest.java
@@ -330,6 +330,7 @@ public class UpdateRequest extends AbstractUpdateRequest {
           urequest.setParams(params);
           urequest.deleteById(deleteId, version);
           urequest.setCommitWithin(getCommitWithin());
+          urequest.setBasicAuthCredentials(getBasicAuthUser(), getBasicAuthPassword());
           request = new LBHttpSolrClient.Req(urequest, urls);
           routes.put(leaderUrl, request);
         }


Mime
View raw message