myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r1803495 - /myfaces/tobago/branches/tobago-2.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/servlet/ResourceServlet.java
Date Mon, 31 Jul 2017 09:01:30 GMT
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



Mime
View raw message