diff --git a/spring-web/src/main/java/org/springframework/http/converter/multipart/PartGenerator.java b/spring-web/src/main/java/org/springframework/http/converter/multipart/PartGenerator.java index d8e432e60bb..479ba37e0b7 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/multipart/PartGenerator.java +++ b/spring-web/src/main/java/org/springframework/http/converter/multipart/PartGenerator.java @@ -86,6 +86,7 @@ final class PartGenerator implements MultipartParser.PartListener { @Override public void onHeaders(HttpHeaders headers) { + // no-op on the first part, since InitialState does not override onComplete() this.state.onComplete(); if (isFormField(headers)) { this.state = new FormFieldState(headers);