arturobernalg opened a new pull request, #1269: URL: https://github.com/apache/tomcat/pull/1269
https://bz.apache.org/bugzilla/show_bug.cgi?id=70375 `WebappClassLoaderBase.findResources()` returns an empty enumeration for names starting with `/`, while `findResource()`, `getResource()` and `getResourceAsStream()` accept such names and find the resource. For the same name, `getResources()` and `getResource()` therefore disagree. This removes the check, so `findResources()` handles these names in the same way as the other lookups. The two existing leading-slash tests now assert that `findResources()` and `getResources()` return the same resource as `findResource()` and `getResource()`; both fail without the change. Tested on a Tomcat built from this branch, with a file in `WEB-INF/classes`, a file in a `WEB-INF/lib` JAR and a `.class` resource: for `/name`, `getResources()` now returns 1 URL, as `getResource()` and `getResourceAsStream()` do. main is not changed: there all lookups already reject a leading `/` consistently. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
