IMO this is a bug introduced with [1][2]. Although the root cause is in the
bad impl. of FileResource [3] that ignores the IOException and despite the
error, still returns a byte[] as if nothing bad happened.

[1] https://bz.apache.org/bugzilla/show_bug.cgi?id=60146

PS: Maybe this should be forwarded to the tomcat dev list ?

Kind regards,

2016-10-13 12:06 GMT+03:00 Romain Manni-Bucau <rmannibu...@gmail.com>:

> Hi guys,
> upgrading tomee to tomcat 8.5.6 I noticed request.getServletContext().
> getResourceAsStream(path) now returns an empty stream for / (or an existing
> folder probably). Not sure it is expected or unintended.
> Reading the spec it is not that clear to me since the folder is an existing
> resource but not really a webresource so not it should be considered as a
> resource and therefore having a stream (which doesn't mean much for a
> folder).
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/
> rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>

Reply via email to