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

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

Merged

Conversation

Revolyssup
Copy link
Contributor

@Revolyssup Revolyssup commented Nov 21, 2024

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
Contributor Author

@membphis can you review this?

membphis
membphis previously approved these changes Nov 25, 2024
Copy link
Member

@membphis membphis left a comment

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

@@ -184,6 +201,8 @@ local function set_input_format(conf, typ, ct, method)
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
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

@Revolyssup Revolyssup merged commit 2eb0023 into apache:master Nov 29, 2024
30 checks passed
@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