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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]