Skip to content

Read mixed and related multipart bodies as parts - #37752

Open
wozhenbang2004 wants to merge 1 commit into
spring-projects:mainfrom
wozhenbang2004:read-mixed-related-parts-30230
Open

wozhenbang2004 wants to merge 1 commit into
spring-projects:mainfrom
wozhenbang2004:read-mixed-related-parts-30230

Conversation

@wozhenbang2004

Copy link
Copy Markdown

WebClient rejects bodyToFlux(Part.class) for multipart/mixed and multipart/related. Reading the response into a map works only when every part has a name. A related response can identify its attachments by Content-ID alone.

This lets the part reader handle both media types. An unnamed text part keeps its original bytes, including its UTF-16 byte order. Named form fields can still be read as FormFieldPart.

See #30230.

WebClient rejects multipart/mixed and multipart/related when reading
a Flux of parts. Reading into a map instead requires a name for each
part, which these media types do not require.

Use the same media types for both readers. Keep an unnamed part's
original bytes so a text part retains its byte order when read back.

See spring-projectsgh-30230

Signed-off-by: Kayokoi <113896798+wozhenbang2004@users.noreply.github.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged or decided on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants