You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2017/07/31 09:01:30 UTC

svn commit: r1803495 - /myfaces/tobago/branches/tobago-2.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/servlet/ResourceServlet.java

Author: weber
Date: Mon Jul 31 09:01:30 2017
New Revision: 1803495

URL: http://svn.apache.org/viewvc?rev=1803495&view=rev
Log:
TOBAGO-1772 - ResourceServlet: Resource not found if resourceDirs have the same prefix

Modified:
    myfaces/tobago/branches/tobago-2.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/servlet/ResourceServlet.java

Modified: myfaces/tobago/branches/tobago-2.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/servlet/ResourceServlet.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-2.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/servlet/ResourceServlet.java?rev=1803495&r1=1803494&r2=1803495&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-2.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/servlet/ResourceServlet.java (original)
+++ myfaces/tobago/branches/tobago-2.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/servlet/ResourceServlet.java Mon Jul 31 09:01:30 2017
@@ -131,7 +131,7 @@ public class ResourceServlet extends Htt
     final String requestURI = request.getRequestURI();
     String resource = requestURI.substring(request.getContextPath().length() + 1);
     for (final String resourceDir : resourceDirs) {
-      if (resource.startsWith(resourceDir)) {
+      if (resource.startsWith(resourceDir + "/")) {
         final int dirLength = resourceDir.length();
         if (dirLength < resource.length() && Character.isDigit(resource.charAt(dirLength + 1))) {
           // cut off the version number