Affects: 5.x
Two months ago similar issue has been submitted but has already been fixed and released so I'm opening a new one.
I also came across a server that is not robust enough and fails when charset
is used as a parameter inside Content-Type
header for multipart
media type. As specified by RFC7578, only boundary
is a required parameter and there are no optional parameters.
I'm submitting an issue for FormHttpMessageConverter
. Same logic applied as a fix for #25885 can probably be used in this situation also.
https://github.com/spring-projects/spring-framework/blob/a109b4c31a29a9a6c147e3238e14be27d70527f9/spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java#L478
Edit:
I know there is a workaround where one can use setMultipartCharset()
to prevent charset
from showing in header. In my opinion it would be better if Content-Type
header was aligned with specification and it worked in same fashion as MultipartWriterSupport
now works.