The FormHttpMessageConverter#writeMultipart
method should support repeatable bodies, rather than only supporting single-write. Today StreamingHttpOutputMessage.Body#repeatable
returns false
, by default.
FormHttpMessageConverter#writeForm
got support for repeatable writes in
https://github.com/spring-projects/spring-framework/commit/6dd93d4d85dabe98c323b950c84bc35b593ccdf1
Continuation of https://github.com/spring-projects/spring-framework/issues/31449#issuecomment-2857996599
Comment From: rstoyanchev
Some parts may not be repeatable. To find out for sure, it is necessary to iterate parts upfront, find a compatible message converter for each part, and check with the converter if the given (part) object is repeatable. If all parts are repeatable, then the multipart write is repeatable.