Fix issue where FormHttpMessageConverter fails to write multipart data
FormHttpMessageConverter incorrectly determines that the media type "multipart/form-data; charset=utf-8" is not multipart. This commit allows the media type to contain a charset parameter.
This commit is contained in:
committed by
Rossen Stoyanchev
parent
7aa5e65235
commit
83ecf5ca1d
@@ -244,7 +244,7 @@ public class FormHttpMessageConverter implements HttpMessageConverter<MultiValue
|
||||
|
||||
private boolean isMultipart(MultiValueMap<String, ?> map, MediaType contentType) {
|
||||
if (contentType != null) {
|
||||
return MediaType.MULTIPART_FORM_DATA.equals(contentType);
|
||||
return MediaType.MULTIPART_FORM_DATA.includes(contentType);
|
||||
}
|
||||
for (String name : map.keySet()) {
|
||||
for (Object value : map.get(name)) {
|
||||
|
||||
Reference in New Issue
Block a user