From: Christopher Faulet Date: Wed, 4 Nov 2026 08:47:04 +0000 (+0100) Subject: BUG/MINOR: http-ana: also set FINAL on http-response actions on server error X-Git-Url: https://git.kaiwu.me/$%7BISSUES%7D/static/gitweb.js?a=commitdiff_plain;h=096a1307b26d64c9a88cae072792bb5cc480a683;p=haproxy.git BUG/MINOR: http-ana: also set FINAL on http-response actions on server error http_res_get_intercept_rule() stops http-response actions from yielding once the client side is dead: when the frontend connector reports an error or an early close, the action is called with ACT_OPT_FINAL, so a yield is refused and the caller receives an HTTP_RULE_RES_ERROR instead of being left waiting forever. The server side was missing: when the backend connector reports an error while an http-response action (e.g. send-spoe-group) is yielding, the action kept waiting for a wakeup that would only ever come from the server it just lost, and the response was stuck in the channel until the client timed out. Add the missing server-side condition: an SC_FL_ERROR on the backend connector also sets ACT_OPT_FINAL, so http-response actions get a final chance to conclude when the server dies. Combined with the previous commit, the "server answered early and reset its stream while the action was pending" case from github issue #3559 now lets the action conclude with an error instead of hanging the response. This patch should be backported to all supported versions. --- diff --git a/src/http_ana.c b/src/http_ana.c index a75c41a24..1afa11b65 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -3047,7 +3047,7 @@ static enum rule_result http_res_get_intercept_rule(struct proxy *px, struct lis if (final) act_opts |= ACT_OPT_FINAL; - if ((s->scf->flags & SC_FL_ERROR) || + if ((s->scf->flags & SC_FL_ERROR) || (s->scb->flags & SC_FL_ERROR) || ((s->scf->flags & SC_FL_EOS) && proxy_abrt_close_def(px, 1))) act_opts |= ACT_OPT_FINAL | ACT_OPT_FINAL_EARLY;