Kong / kong

🦍 The Cloud-Native API Gateway and AI Gateway.
https://konghq.com/install/#kong-community
Apache License 2.0
39.24k stars 4.81k forks source link

ngx.req.get_body_data can not get request body data #3337

Closed jian-sun closed 6 years ago

jian-sun commented 6 years ago

when request body size exceed client_max_body_size , the function ngx.req.get_body_data result is null should use ngx.req.get_body_file? effected plugin

  1. galileo 2.hmac-auth 3.request-size-limiting 4.request-transformer 5.runscope
bungle commented 6 years ago

This has been our design choice that we never revert to file io, as it will block the worker. Right now you need to extend the buffers or use ngx.req.socket to stream read the body. I am not sure if we ever going to make use of file buffering.

bungle commented 6 years ago

I will close this for now, but there is a change that we do something about it in future. But I guess we will then use ngx.req.socket unless there is better support for non-blocking file io.

jian-sun commented 6 years ago

How to use ngx.req.socket to process chunked request body