]> git.kaiwu.me - haproxy.git/commit
MINOR: httpclient/lua: Don't set req_payload callback if body is empty
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 14 Oct 2022 12:57:04 +0000 (14:57 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 14 Oct 2022 13:18:25 +0000 (15:18 +0200)
commit380ae9c3ff4919c9ea36d3d713427575c44fe4b8
tree26bfaeb88dff1d39b057d2c6a15fb7024d776bac
parent48005de17c9af5dd2faf825fedfe118bdcc150ef
MINOR: httpclient/lua: Don't set req_payload callback if body is empty

The HTTPclient callback req_payload callback is set when a request payload
must be streamed. In the lua, this callback is set when a body is passed as
argument in one of httpclient functions (head/get/post/put/delete). However,
there is no reason to set it if body string is empty.

This patch is related to the issue #1898. It may be backported as far as
2.5.
src/hlua.c