From d8f6654c9f0ee9b2b0dded2daf819e307bd09a61 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 9 Jul 2025 15:20:41 +0200 Subject: [PATCH] BUG/MEDIUM: http-client: Notify applet has more data to deliver until the EOM When we leave the I/O handler with an unfinished request, we must report the applet has more data to deliver. Otherwise, when the channel request buffer is emptied, the http-client applet is not always woken up to forward the remaining request data. This issue was probably revealed by commit "BUG/MEDIUM: http-client: Don't wake http-client applet if nothing was xferred". It is only an issue with large POSTs, when the payload is streamed. This patch must be backported as far as 2.6 with the commit above. But on older versions, the applet API may differ. So be careful. (cherry picked from commit 0b97bf36fad6fbced8077ac416a1399c05806c7d) Signed-off-by: Amaury Denoyelle (cherry picked from commit dd3ba78fc13a99e79052496d1851cff65c24f73c) Signed-off-by: Christopher Faulet (cherry picked from commit 91f19003114ad4afcb189233d0784c6f7ce923f4) Signed-off-by: Christopher Faulet --- src/http_client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/http_client.c b/src/http_client.c index 027dc09..624219b 100644 --- a/src/http_client.c +++ b/src/http_client.c @@ -760,9 +760,9 @@ void httpclient_applet_io_handler(struct appctx *appctx) se_fl_set(appctx->sedesc, SE_FL_EOI); break; } - else - appctx->st0 = HTTPCLIENT_S_REQ_BODY; + applet_have_more_data(appctx); + appctx->st0 = HTTPCLIENT_S_REQ_BODY; goto out; /* we need to leave the IO handler once we wrote the request */ break; @@ -835,6 +835,7 @@ void httpclient_applet_io_handler(struct appctx *appctx) break; } + applet_have_more_data(appctx); goto process_data; /* we need to leave the IO handler once we wrote the request */ } break; -- 1.7.10.4