]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: applet: Automatically handle applets having more data for the stream
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 23 Jan 2024 07:01:43 +0000 (08:01 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Feb 2024 14:04:06 +0000 (15:04 +0100)
This should simplify applets implementation. Of course an applet should
still do it by itself if conditions to set this flag differ.

src/applet.c

index 28341838cab05d2e2e2a0ff3b3401ec33e568881..abf8611939e1b838d3a293c5608b0366c3a3d053 100644 (file)
@@ -822,6 +822,9 @@ struct task *task_process_applet(struct task *t, void *context, unsigned int sta
 
        TRACE_POINT(APPLET_EV_PROCESS, app);
 
+       if (b_data(&app->outbuf) || se_fl_test(app->sedesc, SE_FL_MAY_FASTFWD))
+               applet_have_more_data(app);
+
        sc_applet_sync_recv(sc);
 
        /* TODO: May be move in appctx_rcv_buf or sc_applet_process ? */