Baoyuantop commented on code in PR #13243:
URL: https://github.com/apache/apisix/pull/13243#discussion_r3135322485


##########
apisix/core/request.lua:
##########
@@ -290,15 +290,6 @@ function _M.get_body(max_size, ctx)
         end
     end
 
-    -- check content-length header for http2/http3

Review Comment:
   This modification is too extensive, we recommend:
   
   1. **Narrow the fix to `ext-plugin-post-resp.lua`**: bypass 
`core.request.get_body()` and use `ngx.req.read_body()` + 
`ngx.req.get_body_data()` directly for the upstream replay request
   2. **Or refine the check in `get_body()`**: skip the Content-Length check 
for request methods that typically have no body (GET, HEAD, DELETE, OPTIONS), 
while keeping it for POST/PUT/PATCH
   3. **Add targeted tests**: add H2 test cases specifically for 
`ext-plugin-post-resp` to cover the reported scenario, and verify no regression 
in other H2-dependent plugins (e.g., `grpc-web`, `batch-requests`)



-- 
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]

Reply via email to