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

bugfix: let balancer.recreate_request API work for body data changed case #2334

Conversation

oowl
Copy link
Contributor

@oowl oowl commented Jul 11, 2024

I hereby granted the copyright of the changes in this pull request
to the authors of this lua-nginx-module project.

Context: #2333

@oowl oowl changed the title feat: let balancer.recreate_request API work for body data feature: let balancer.recreate_request API work for body data Jul 11, 2024
@oowl
Copy link
Contributor Author

oowl commented Jul 11, 2024

From https://github.com/openresty/lua-resty-core/blob/master/lib/ngx/balancer.md#recreate_request, recreate_request will recreate all request buffers which send upstream, So it's not only the header but also body data, that's an implementation bug for openresty.

@oowl oowl changed the title feature: let balancer.recreate_request API work for body data bugfix: let balancer.recreate_request API work for body data Jul 11, 2024
@oowl oowl changed the title bugfix: let balancer.recreate_request API work for body data bugfix: let balancer.recreate_request API work for body data changed case Jul 11, 2024
zhuizhuhaomeng
zhuizhuhaomeng previously approved these changes Jul 11, 2024
@zhuizhuhaomeng
Copy link
Contributor

@oowl please add a test case to cover this bug.

@oowl oowl requested a review from zhuizhuhaomeng July 12, 2024 02:54
@oowl
Copy link
Contributor Author

oowl commented Jul 12, 2024

@zhuizhuhaomeng CI is flaky, I am not sure why the plan number is not stable in our Perl test.

@zhuizhuhaomeng zhuizhuhaomeng merged commit 8670e53 into openresty:master Jul 12, 2024
2 of 3 checks passed
fffonion pushed a commit to Kong/kong that referenced this pull request Sep 12, 2024
…ffer (#13377)

issue when ngx.req.set_body_data is used in balancer phase

backport Openresty upstream fix: openresty/lua-nginx-module#2334
issues context: openresty/lua-nginx-module#2333

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

Successfully merging this pull request may close these issues.

2 participants