Skip to content

MultipartHttpMessageWriter should not subscribe to Publisher multipart data [SPR-16402] #20948

Closed
@spring-projects-issues

Description

@spring-projects-issues

Arjen Poutsma opened SPR-16402 and commented

The MultipartHttpMessageWriter should not subscribe to the partWritten mono, as that can result in exceptions when the data written comes out of a publisher itself, and when that publisher can only be subscribed to once.

For instance, when the data is coming from a Channel, and that channel closes after the first subscription, the second time the publisher is subscribed to results in IO exceptions.


Affects: 5.0.2

Reference URL: https://github.com/rstoyanchev/spring-framework/blob/6c3a64578c10dd4e6fed933864f1721cf35203ae/spring-web/src/main/java/org/springframework/http/codec/multipart/MultipartHttpMessageWriter.java#L278

Issue Links:

Referenced from: commits 09f1f72, afd248d

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions