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: Solve the problem that the body-transfomer plug-in cannot convert xml… #10942

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guankai
Copy link

@guankai guankai commented Feb 18, 2024

Solve the problem that the body-transfomer plug-in cannot convert xml…

Description

When using the body-transformer plug-in in the apisix3.2 version and configuring it according to the example provided in the demo, the returned xml data cannot be obtained. After replacing the body-transformer.lua corresponding to the master version, the problem still cannot be solved.

Fixes # (issue)

Changed the method of obtaining body in response from core.response.hold_body_chunk(ctx) to ngx.arg[1], the problem was solved

@guankai guankai changed the title [fixbug] Solve the problem that the body-transfomer plug-in cannot convert xml… [fix] Solve the problem that the body-transfomer plug-in cannot convert xml… Feb 18, 2024
@guankai guankai changed the title [fix] Solve the problem that the body-transfomer plug-in cannot convert xml… fix: Solve the problem that the body-transfomer plug-in cannot convert xml… Feb 18, 2024
@guankai
Copy link
Author

guankai commented Feb 19, 2024

It prompts a compilation error, getting lua global tostring. I verified on the server that there is no problem, and this is a function of Lua itself. Why does it report an error when compiling on your server?

@monkeyDluffy6017
Copy link
Contributor

The core.response.hold_body_chunk is used to handle the chunked response body, I don't think this need to be changed, maybe you should dig deeper into this

@Revolyssup
Copy link
Contributor

@guankai Do you have any updates on this?

@guankai
Copy link
Author

guankai commented Apr 10, 2024

@guankai Do you have any updates on this?

no,thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants