manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1703187 - in /manifoldcf/trunk: CHANGES.txt connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
Date Tue, 15 Sep 2015 13:05:13 GMT
Author: kwright
Date: Tue Sep 15 13:05:13 2015
New Revision: 1703187

URL: http://svn.apache.org/r1703187
Log:
Fix for CONNECTORS-1239.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1703187&r1=1703186&r2=1703187&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Tue Sep 15 13:05:13 2015
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 2.3-dev =====================
 
+CONNECTORS-1239: Handle code 401 from Solr more appropriately.
+(Cathal McGuinness, Karl Wright)
+
 CONNECTORS-1236: Upgrade to Tika 1.10.
 (Karl Wright)
 

Modified: manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java?rev=1703187&r1=1703186&r2=1703187&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
(original)
+++ manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
Tue Sep 15 13:05:13 2015
@@ -408,6 +408,14 @@ public class HttpPoster
       // Can't process the document, so don't keep trying.
       return;
 
+    // If code is 401, we should abort the job because security credentials are incorrect
+    if (code == 401)
+    {
+      String message = "Solr authorization failure, code "+code+": aborting job";
+      Logging.ingest.error(message);
+      throw new ManifoldCFException(message);
+    }
+    
     // If the code is in the 400 range, the document will never be accepted, so indicate
that.
     if (code >= 400 && code < 500)
       return;



Mime
View raw message