From: funkman Date: Fri, 29 Oct 2010 13:43:30 +0000 (+0000) Subject: for resourceOnlyServlets allow whitespace in the comma X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=78a2565b7b7963c886451d3d9a932eda18604f52;p=tomcat7.0 for resourceOnlyServlets allow whitespace in the comma seperated list. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1028737 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/core/StandardContext.java b/java/org/apache/catalina/core/StandardContext.java index 099795c08..b1c2a792e 100644 --- a/java/org/apache/catalina/core/StandardContext.java +++ b/java/org/apache/catalina/core/StandardContext.java @@ -826,13 +826,14 @@ public class StandardContext extends ContainerBase @Override public void setResourceOnlyServlets(String resourceOnlyServlets) { this.resourceOnlyServlets.clear(); - if (resourceOnlyServlets == null || - resourceOnlyServlets.length() == 0) { + if (resourceOnlyServlets == null) { return; } - String[] servletNames = resourceOnlyServlets.split(","); - for (String servletName : servletNames) { - this.resourceOnlyServlets.add(servletName); + for (String servletName : resourceOnlyServlets.split(",")) { + servletName = servletName.trim(); + if (servletName.length()>0) { + this.resourceOnlyServlets.add(servletName); + } } }