lua-resty-http icon indicating copy to clipboard operation
lua-resty-http copied to clipboard

If the Post the body is nil, will get unexpected error

Open chensunny opened this issue 6 months ago • 0 comments

Summary

If the Post body is nil, expect the request to return an error (failfast). But in fact, it will wait until the server timeout, because it only sends the request line with Post The server will wait for the Body until the timeout.

Solution

where the request includes a body like Post, the body can not be nil

Other

When we use the kong.request.get_raw_body() to get the original body and use the resty client to send to another server. If the body overflows client_body_buffer_size, it will return nil.

chensunny avatar Jul 10 '25 03:07 chensunny