From 757c245bee057b899107be113fcfc0e4cce3b4a2 Mon Sep 17 00:00:00 2001 From: Noble Paul Date: Mon, 29 Aug 2016 13:07:03 +0530 Subject: [PATCH] SOLR-9188: Trying revert a change and fix the unexpected IOException in jenkins failure. --- .../java/org/apache/solr/servlet/SolrDispatchFilter.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java index 8c792e908ae..17cd6b51001 100644 --- a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java +++ b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java @@ -299,10 +299,15 @@ public class SolrDispatchFilter extends BaseSolrFilter { boolean requestContinues = false; final AtomicBoolean isAuthenticated = new AtomicBoolean(false); AuthenticationPlugin authenticationPlugin = cores.getAuthenticationPlugin(); - if (authenticationPlugin == null || - PKIAuthenticationPlugin.PATH.equals(((HttpServletRequest)request).getPathInfo())) { + if (authenticationPlugin == null) { return true; } else { + try { + if (PKIAuthenticationPlugin.PATH.equals(((HttpServletRequest) request).getPathInfo())) return true; + } catch (Exception e) { + log.error("Unexpected error ", e); + } + //special case when solr is securing inter-node requests String header = ((HttpServletRequest) request).getHeader(PKIAuthenticationPlugin.HEADER); if (header != null && cores.getPkiAuthenticationPlugin() != null)