Description
When MockMultipartHttpServletRequestBuilder
is initialized with Part
(rather than MultipartFile
) instances, it correctly creates a MockHttpServletRequest
as per its contract. However in order for this to work correctly the request must then be wrapped with StandardMultipartHttpServletRequest
which works out which parts are files (and exposed also as MultipartPartFile
) and which ones are not files (and must be exposed as request parameters).
Currently MockMultipartHttpServletRequestBuilder
does this which ensures that file parts are recognized but it doesn't ensure the rest are exposed as request parameters which can also cause issues for @RequestPart
arguments.
Existing tests appear to be using a filename which makes it work but masks the problem.