-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Configure StandardServletMultipartResolver to only support multipart/form-data #26826
Comments
How do you intend to handle you |
It seems generally sensible to delegate to the container to find out about actual multipart support. If Tomcat accepts other multipart content types as well, we should arguably let it happen that way. The problem seems rather that we're eagerly calling You can get such lenient handling already by defining your own That said, it would help a lot to understand your specific scenario. I wonder what's commonly expected for such non-form multipart request types: rejecting them upfront if not supported, or rather letting the application deal with it in a custom way? |
I've introduced a |
It seems that
StandardServletMultipartResolver
wrapsmultipart/mixed
requests withStandardMultipartHttpServletRequest
which fails in Jetty due to strict conformance to the spec.I.e.
HttpServletRequest.getParts()
should only be called when the content type ismultipart/from-data
and not just any content type that starts withmultipart/
Spring Framework Version: 5.2.9
Please see jetty/jetty.project#6196 for details. (exception and original request)
The text was updated successfully, but these errors were encountered: