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(PDK): fix response body repeated when kong.response.get_raw_body() called multiple times #11424

Merged

Conversation

vm-001
Copy link
Member

@vm-001 vm-001 commented Aug 18, 2023

Summary

ngx.ctx.KONG_BODY_BUFFER is not reset while reading the EOF chunk. When kong.response.get_raw_body() is called multiple times, the response body gets repeated.

Checklist

Issue reference

FTI-5296

--- request
GET /t
--- response_body
hello, world!
Copy link
Member Author

Choose a reason for hiding this comment

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

The response gets repeated if the fix is not applied: hello, world!hello, world!

@bungle
Copy link
Member

bungle commented Aug 18, 2023

Great!

@bungle bungle force-pushed the fix/repeated-response-when-get-raw-body-called-multiple-times branch from e1128f0 to bd54a42 Compare August 18, 2023 11:55
@pull-request-size pull-request-size bot added size/M and removed size/S labels Aug 21, 2023
@vm-001 vm-001 force-pushed the fix/repeated-response-when-get-raw-body-called-multiple-times branch from c6f090b to 18b04fd Compare August 21, 2023 03:38
@bungle bungle merged commit 48a2de2 into master Aug 21, 2023
22 checks passed
@bungle bungle deleted the fix/repeated-response-when-get-raw-body-called-multiple-times branch August 21, 2023 06:17
team-gateway-bot pushed a commit that referenced this pull request Aug 21, 2023
…) called multiple times (#11424)

(cherry picked from commit 48a2de2)
@chronolaw
Copy link
Contributor

chronolaw commented Aug 21, 2023

Does this CHANGELOG/unreleased/kong/11424.yaml work now?

Should we remove it now?

@kikito
Copy link
Member

kikito commented Aug 22, 2023

Does this CHANGELOG/unreleased/kong/11424.yaml work now?

Should we remove it now?

@vm-001 @VicYP what should we do with the changelog entries here (kong CE)?

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

4 participants