-
Notifications
You must be signed in to change notification settings - Fork 38k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<mvc:resources> does not handles directories well [SPR-12999] #17591
Comments
Brian Clozel commented Hello Michael Osipov I've been trying to reproduce this error and couldn't. Right now, the Resource handling chain checks that the resolved resource exists ( While HTTP 404 may still not be ideal, it's still more consistent than a server error. I've created this repro project; could you take a look at it? |
Michael Osipov commented Hi Brian, thanks a lot for the quick test project. I won't get back to work before Monday so I need to ask you to be patient. What I can say now is that I have a multimodule project where documentation is a Maven module and webapp is a separate one.I did even had the |
Michael Osipov commented Brian, here is my change to the issue project: https://github.com/michael-o/spring-framework-issues/commit/9a701f5356839469ebc8e426dac641b45e119266 Cargo does not work for me because I am behind a proxy, though Jetty does its job. Invoke You'll see in Jetty:
and in Tomcat:
The difference is mentioned in the commit message. |
Brian Clozel commented I managed to reproduce this issue, but only using jetty; tomcat + cargo works fine. I'm trying to narrow down the cause of this issue. Thanks |
Michael Osipov commented Testing with Eclipse was done with Apache Tomcat 6.0.41. |
Brian Clozel commented Thanks Michael Osipov for this report. This is now fixed with more defensive checks in the Please note that:
|
Michael Osipov commented Hi Brian, thanks for that fix, looking forward to. This isn't perfect, probably never will but better than having unpredictable expections flying around. Do you think it is worth filing issues in Tomcat 6 and Jetty 9?. We use Tomcat 6 exclusively, but still. |
Michael Osipov opened SPR-12999 and commented
Say I have this mapping:
Request
docs/
or any other subdirectory ends up in a HTTP 500:I would rather expect here 200 or better yet 204. The directory does exist but WebMVC does not know how to handle. I have debugged the implementation and
Resource
is retrieved butgetInputStream
fails. Moreover, content length is 0.I don't expect an extensive handling like in Apache
s
mod_dir` but at least not a 500.Meanwhile, I have applied this workaround:
Affects: 4.1.6
Referenced from: commits 9e8e7aa, c99cc53, 4d5fca5
The text was updated successfully, but these errors were encountered: