Goend opened a new pull request, #13243:
URL: https://github.com/apache/apisix/pull/13243
### Description
This PR fixes an issue in `ext-plugin-post-resp` when handling HTTP/2 and
HTTP/3 requests without a `Content-Length` header.
Currently, `ext-plugin-post-resp` replays the original client request to
upstream and reads the request body via `core.request.get_body()`. After the
behavior introduced in #10887, `core.request.get_body()` rejects
HTTP/2 and HTTP/3 requests that do not contain a `Content-Length` header.
This causes valid body-less requests such as normal `GET` requests over
HTTP/2 to fail unexpectedly with `502` when `ext-plugin-post-resp` is enabled.
This PR avoids using `core.request.get_body()` in `ext-plugin-post-resp`
and reads the request body directly from the Nginx request APIs instead. As a
result, body-less HTTP/2 and HTTP/3 requests are handled
correctly, while requests that actually contain a body can still be
forwarded as expected.
#### Which issue(s) this PR fixes:
Fixes #13237
### Checklist
- [x] I have explained the need for this PR and the problem it solves
- [x] 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
- [x] I have verified that this change is backward compatible (If not,
please discuss on the [APISIX mailing
list](https://github.com/apache/apisix/tree/master#community) first)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]