parent
21becef1bd
commit
0c56e86bfb
|
|
@ -265,6 +265,7 @@ public class FormHttpMessageConverter implements HttpMessageConverter<MultiValue
|
|||
for (Map.Entry<String, List<Object>> entry : parts.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
for (Object part : entry.getValue()) {
|
||||
if (part != null) {
|
||||
writeBoundary(boundary, os);
|
||||
HttpEntity entity = getEntity(part);
|
||||
writePart(name, entity, os);
|
||||
|
|
@ -272,6 +273,7 @@ public class FormHttpMessageConverter implements HttpMessageConverter<MultiValue
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void writeBoundary(byte[] boundary, OutputStream os) throws IOException {
|
||||
os.write('-');
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ public class FormHttpMessageConverterTests {
|
|||
parts.add("name 1", "value 1");
|
||||
parts.add("name 2", "value 2+1");
|
||||
parts.add("name 2", "value 2+2");
|
||||
parts.add("name 3", null);
|
||||
|
||||
Resource logo = new ClassPathResource("/org/springframework/http/converter/logo.jpg");
|
||||
parts.add("logo", logo);
|
||||
|
|
|
|||
Loading…
Reference in New Issue