Skip to content

feat(body-transformer): support mulipart content-type#11767

Merged
Revolyssup merged 7 commits into
apache:masterfrom
Revolyssup:revolyssup/support-multipart-content
Nov 29, 2024
Merged

feat(body-transformer): support mulipart content-type#11767
Revolyssup merged 7 commits into
apache:masterfrom
Revolyssup:revolyssup/support-multipart-content

Conversation

@Revolyssup

@Revolyssup Revolyssup commented Nov 21, 2024

Copy link
Copy Markdown
Contributor

Description

This PR adds support for multipart content-type in body-transformer plugin.

Fixes # (issue)

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request plugin labels Nov 21, 2024
@Revolyssup
Revolyssup requested a review from nic-chen November 22, 2024 07:14
@Revolyssup

Copy link
Copy Markdown
Contributor Author

@membphis can you review this?

membphis
membphis previously approved these changes Nov 25, 2024

@membphis membphis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, except one minor thing

Comment thread apisix/plugins/body-transformer.lua Outdated
conf[typ].input_format = "json"
elseif str_find(ct:lower(), "application/x-www-form-urlencoded", nil, true) then
conf[typ].input_format = "encoded"
elseif str_find(ct:lower(), "multipart/", nil) then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

performance: we should enable plain mode

image

Comment thread apisix/plugins/body-transformer.lua Outdated
@Revolyssup
Revolyssup merged commit 2eb0023 into apache:master Nov 29, 2024
@Revolyssup
Revolyssup deleted the revolyssup/support-multipart-content branch November 29, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request plugin size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants