BUG/MEDIUM: applet: Don't pretend to have more data to handle EOI/EOS/ERROR
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 4 Feb 2025 08:20:36 +0000 (09:20 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Feb 2025 10:43:06 +0000 (11:43 +0100)
commit7b8e934ab158b10ed02d5739ae96615b227a3cc7
treef59974f84ccc52c1e18bc8efab931a1816fa7b8a
parent62d46ba2a7a1783f37ec6beb6de3beead6838ba4
BUG/MEDIUM: applet: Don't pretend to have more data to handle EOI/EOS/ERROR

The way appctx EOI/EOS/ERROR flags were reported for applets using the new
API were to state the applet had more data to deliver. But it was not
correct and for APPCTX_FL_EOS, this led to report an error on the SE because
it is not expected. More data to deliver and an end of stream is an
impossible situation.

This was added as a fix by commit b8ca114031 ("BUG/MEDIUM: applet: State
appctx have more data if its EOI/EOS/ERROR flag is set"), mainly to make the
SPOE applet work.

When an applet set one of these flags, it really means it has no more data
to deliver. So we must not try to trigger a new receive to handle these
flags. Instead we must handle them directly in task_process_applet()
function and only if the corresponding SE flags were not already set.

This patch must be backported to 3.1.

(cherry picked from commit 7214dcd52d52ab7fe6ef391aa8039fb3ec40a040)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/applet.c