]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: httpclient: Don't set EOM flag on an empty HTX message
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 14 Oct 2022 13:10:24 +0000 (15:10 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 14 Oct 2022 13:18:25 +0000 (15:18 +0200)
commit48005de17c9af5dd2faf825fedfe118bdcc150ef
treef1328b42e30c90844eeea3ab79d3e66af29bdbfc
parent48e46f98ccf97427995eb41c6f28cc38705bdd7e
BUG/MEDIUM: httpclient: Don't set EOM flag on an empty HTX message

In the HTTP client, when the request body is streamed, at the end of the
payload, we must be sure to not set the EOM flag on an empty message.
Otherwise, because there is no data, the buffer is reset to be released and
the flag is lost. Thus, the HTTP client is never notified of the end of
payload for the request and the applet is blocked. If the HTTP client is
instanciated from a Lua script, it is even worse because we fall into a
wakeup loop between the lua script and the HTTP client applet. At the end,
HAProxy is killed because of the watchdog.

This patch should fix the issue #1898. It must be backported to 2.6.
src/http_client.c