CommonsMultipartResolver and DEBUG logging lead to empty fileMap in MultipartHttpServletRequest #27350
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Affects:
Spring: 5.3.9 but the error also occurs in earlier Versions (i could also reproduce it with 5.2.6)
Problem:
If a CommonsMultipartResolver is used to Handle File Upload to a Spring RestController and the LogLevel of the Dispatcher Servlet is set to DEBUG a Request Containing a Multipart File leads to an empty FileMap on the MultipartHttpServletRequest. If eighter the LogLevel is not DEBUG or another Resolver is used the same Request contains a FileMap,.
Expected Behavior:
The expected behavior would be that he LogLevel and the choice of the MultipartResolver do not change the behavior and the Request should always contain a File on the MultipartHttpServletRequest.
Example Application:
I created an example Application to check the behavior here:
https://gitlab.com/katja_m_franz/springbug
It is a really small Application and i hope you can easily reproduce the described Problem. All Info on how to do that can be found on the projects readme.
The text was updated successfully, but these errors were encountered: