Skip to content

refactor: use setmetatable to set hidden variables without effecting serialisation#11770

Merged
Revolyssup merged 3 commits into
apache:masterfrom
Revolyssup:revolyssup/refactor/set-metatable
Nov 22, 2024
Merged

refactor: use setmetatable to set hidden variables without effecting serialisation#11770
Revolyssup merged 3 commits into
apache:masterfrom
Revolyssup:revolyssup/refactor/set-metatable

Conversation

@Revolyssup

@Revolyssup Revolyssup commented Nov 21, 2024

Copy link
Copy Markdown
Contributor

Description

Users hope to directly use the decoded body in the template of body-transformer, modify its fields, and then encode it again. Previously, we set several hidden variables in the _out variable, including function-type variables, which caused issues with direct encoding.

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. tech debt labels Nov 21, 2024
@Revolyssup
Revolyssup merged commit be74619 into apache:master Nov 22, 2024
@Revolyssup
Revolyssup deleted the revolyssup/refactor/set-metatable branch November 22, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files. tech debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants