Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix binding mixed attributes to body parameters #6764

Merged
merged 1 commit into from Jan 18, 2022
Merged

Conversation

yawkat
Copy link
Member

@yawkat yawkat commented Jan 17, 2022

NettyHttpRequest.buildBody distinguishes between requests with "received data" and "received content", where the former only applies when AbstractHttpData instances are present. AbstractHttpData is a base class of both DiskAttribute and MemoryAttribute, but not of MixedAttribute. This makes buildBody use the "content" path for mixed requests.

This change adds an exception for MixedAttribute so that it is also covered by the "data" path.

Fixes #6705

`NettyHttpRequest.buildBody` distinguishes between requests with "received data" and "received content", where the former only applies when `AbstractHttpData` instances are present. `AbstractHttpData` is a base class of both `DiskAttribute` and `MemoryAttribute`, but not of `MixedAttribute`. This makes `buildBody` use the "content" path for mixed requests.

This change adds an exception for `MixedAttribute` so that it is also covered by the "data" path.

Fixes #6705
@yawkat yawkat added the type: bug Something isn't working label Jan 17, 2022
@yawkat yawkat added this to the 3.2.7 milestone Jan 17, 2022
@jameskleeh jameskleeh merged commit d8cb3e7 into 3.2.x Jan 18, 2022
@jameskleeh jameskleeh deleted the mixed-attr-bind branch January 18, 2022 16:03
yawkat added a commit that referenced this pull request Jan 21, 2022
`NettyHttpRequest.buildBody` distinguishes between requests with "received data" and "received content", where the former only applies when `AbstractHttpData` instances are present. `AbstractHttpData` is a base class of both `DiskAttribute` and `MemoryAttribute`, but not of `MixedAttribute`. This makes `buildBody` use the "content" path for mixed requests.

This change adds an exception for `MixedAttribute` so that it is also covered by the "data" path.

Fixes #6705
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multipart handling errors
3 participants