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:
Roy Clarkson
2014-12-02 00:24:11 -06:00
committed by Rossen Stoyanchev
parent 7aa5e65235
commit 83ecf5ca1d
2 changed files with 3 additions and 2 deletions

View File

@@ -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)) {