Github user markt-asf commented on the issue: https://github.com/apache/tomcat/pull/109 The specification is not as explicit as it could be in this case. The spec text refers to the Javadoc. The Javadoc says "Returns the resource located at the named path as an InputStream object." without any details of how a directory object should be represented as an InputStream. The Javadoc does include references to URL handlers and URLConnection objects so it is not unreasonable to assume that similar behaviour is expected. One concern that I do have with replicating the URLConnection behaviour is that it is not designed for file names that include \n. The are passed on without escaping and \n is also used as the separator between file names. However, that usage is rare and it might be a limitation we have to live with. There are other APIs that can be used to get directory listings without ambiguity. Rather than going via URLConnection, I'm leaning towards replicating the behaviour. I do want to check if the \n is always used or if it varies with platform.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org