DispatcherServet.checkMultipart() does not consider javax.servlet.error.exception that has a MultipartException cause [SPR-15178] #19744
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Andy Wilkinson opened SPR-15178 and commented
DispatcherServlet.checkMultipart(HttpServletRequest)
attempts to avoid disturbing error rendering. It does so by checking thejava.servlet.error.exception
request attribute and, if its value is aMultipartException
, it skips multipart resolution. As described in the referenced Spring Boot issue, error rendering is still distributed when the error exception was caused by aMultipartException
but is not, itself, aMultipartException
.I've tried providing a custom
DispatcherServlet
that overridescheckMultipart(HttpServletRequest)
and searches through all of the causes:It resolves the problem described above and doesn't appear to have any adverse side-effects.
Affects: 4.3.5
Reference URL: spring-projects/spring-boot#7936
Issue Links:
1 votes, 2 watchers
The text was updated successfully, but these errors were encountered: