gus-asf commented on a change in pull request #397:
URL: https://github.com/apache/solr/pull/397#discussion_r745218319



##########
File path: solr/core/src/java/org/apache/solr/servlet/ServletUtils.java
##########
@@ -122,6 +126,38 @@ public void close() {
     }
   }
 
+  static boolean excludedPath(ArrayList<Pattern> excludePatterns, 
HttpServletRequest request, HttpServletResponse response, FilterChain chain) 
throws IOException, ServletException {
+    String requestPath = getPathAfterContext(request);
+    // No need to even create the HttpSolrCall object if this path is excluded.
+    if (excludePatterns != null) {
+      for (Pattern p : excludePatterns) {
+        Matcher matcher = p.matcher(requestPath);
+        if (matcher.lookingAt()) {
+          if (chain != null) {
+            chain.doFilter(request, response);
+          }
+          return true;
+        }
+      }
+    }
+    return false;
+  }
+
+  static boolean excludedPath(ArrayList<Pattern> excludePatterns, 
HttpServletRequest request, HttpServletResponse response) throws IOException, 
ServletException {

Review comment:
       done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to