Skip to content

ClientCodecConfigurer drops MultipartHttpMessageWriter.partWriters when mutated #24194

@totof3110

Description

@totof3110

Before being configured a WebClient has several partWriters:
image
after being configured it doesn't have any:
image

This prevents multipart files from being serialized by a configured WebClient:

org.springframework.core.codec.CodecException: No suitable writer found for part: input_image
	at org.springframework.http.codec.multipart.MultipartHttpMessageWriter.encodePart(MultipartHttpMessageWriter.java:299)
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
	|_ checkpoint ⇢ Request to PUT https://[redacted] [DefaultWebClient]
Stack trace:
		at org.springframework.http.codec.multipart.MultipartHttpMessageWriter.encodePart(MultipartHttpMessageWriter.java:299)
		at org.springframework.http.codec.multipart.MultipartHttpMessageWriter.lambda$encodePartValues$4(MultipartHttpMessageWriter.java:252)

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: regressionA bug that is also a regression

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions