]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: hlua: Fix end of request detection when retrieving payload
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 3 Mar 2026 08:30:40 +0000 (09:30 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 5 Mar 2026 14:34:46 +0000 (15:34 +0100)
commit7fe1a92bb34478dac8b8315a57c84bbe846afdb3
treea6f55855e5878d9c0172a7e7783713f36c946b79
parenta779d0d23ac3bd30e422d26fcae39dfff93fd524
BUG/MEDIUM: hlua: Fix end of request detection when retrieving payload

When the lua HTTP applet was refactored to use its own buffers, a bug was
introduced in receive() and getline() function. We rely on HTX_FL_EOM flag
to detect the end of the request. But there is nothing preventing extra
calls to these function, when the whole request was consumed. If this
happens, the call will yield waiting for more data with no way to stop it.

To fix the issue, APPLET_REQ_RECV flag was added to know the whole request
was received.

This patch should fix #3293. It must be backported to 3.3.
src/hlua.c