moonming commented on issue #14171:
URL: https://github.com/apache/apisix/issues/14171#issuecomment-6731732924

   Thanks for the detailed reproduction. This is the same runtime regression 
previously reported in https://github.com/apache/apisix/issues/13673.
   
   The root cause is in the APISIX-specific `client_max_body_size` patch 
shipped with APISIX 3.17.0 (apisix-runtime 1.3.6 / apisix-nginx-module 1.19.5). 
When the patch was ported to OpenResty 1.29.2.4, the chunked-body check lost 
its `&& max_body_size` guard. With `client_max_body_size 0`, the check becomes 
`0 - 0 < chunk_size`, so the first non-empty chunk incorrectly triggers a 413. 
The `Content-Length` path retained its zero-value guard, which explains the 
different behavior.
   
   The fix is already merged:
   
   - https://github.com/api7/apisix-nginx-module/pull/115 restores the missing 
guard and adds regression tests. It is included in apisix-nginx-module 1.19.7 / 
apisix-runtime 1.3.9.
   - https://github.com/apache/apisix/pull/13695 integrates apisix-runtime 
1.3.9 into APISIX and adds an APISIX regression test.
   
   Please upgrade to **APISIX 3.19.0** using an official release image, which 
includes the fixed runtime. Verification with `apache/apisix:3.19.0-debian` in 
standalone mode, using the default body-size configuration, no plugins, and a 
real upstream API, returned **200** for both `Content-Length` and HTTP/1.1 
chunked POST requests, and **404** for a chunked request with no matching route.
   
   Closing as fixed in newer releases; 
https://github.com/apache/apisix/issues/13673 is the earlier report of the same 
regression.
   


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