You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2007/12/19 00:08:53 UTC

svn commit: r605356 - /tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java

Author: markt
Date: Tue Dec 18 15:08:51 2007
New Revision: 605356

URL: http://svn.apache.org/viewvc?rev=605356&view=rev
Log:
Fix bug 43241. Patch provided by John Kew.

Modified:
    tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java

Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=605356&r1=605355&r2=605356&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java Tue Dec 18 15:08:51 2007
@@ -507,7 +507,7 @@
     public InputStream getResourceAsStream(String path) {
 
         path = normalize(path);
-        if (path == null)
+        if (path == null || !path.startsWith("/"))
             return (null);
 
         DirContext resources = context.getResources();
@@ -865,7 +865,7 @@
 
         String normalized = path;
 
-        // Normalize the slashes and add leading slash if necessary
+        // Normalize the slashes
         if (normalized.indexOf('\\') >= 0)
             normalized = normalized.replace('\\', '/');
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org