Author: markt Date: Sun Dec 23 12:09:23 2007 New Revision: 606606 URL: http://svn.apache.org/viewvc?rev=606606&view=rev Log: Fix bug 43241. Make ServletContext.getResourceAsStream() spec compliant
Modified: tomcat/tc6.0.x/trunk/STATUS.txt tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=606606&r1=606605&r2=606606&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Dec 23 12:09:23 2007 @@ -31,12 +31,6 @@ +1: jfclere -1: fhanik - Can we add the 'package' directive to make the package match the dir structure -* Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=43241 - ServletContext.getResourceAsStream() not spec compliant - http://svn.apache.org/viewvc?rev=605356&view=rev - +1: markt, pero, fhanik - -1: - * Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=43236 Reset usingWriter and associated flags when response is reset http://svn.apache.org/viewvc?rev=605364&view=rev Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=606606&r1=606605&r2=606606&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java Sun Dec 23 12:09:23 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('\\', '/'); Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=606606&r1=606605&r2=606606&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sun Dec 23 12:09:23 2007 @@ -39,6 +39,10 @@ Fix handling of CometEvent.close when called during BEGIN event (fhanik) </update> <fix> + <bug>43241</bug>: Make ServletContext.getResourceAsStream() conform to + the specification. Patch provided by John Kew. (markt) + </fix> + <fix> <bug>43594</bug>: Use setenv from CATALINA_BASE (if set) in preference to the one in CATALINA_HOME. Patch provided by Shaddy Baddah. (markt/jim) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]