BUG/MINOR: http-ana: Only consider client abort for abortonclose

When abortonclose option is enabled (by default since 3.3), the HTTP rules
can no longer yield if the client aborts. However, stream aborts were also
considered. So it was possible to interrupt yielding rules, especially on
the response processing, while the client was still waiting for the
response.

So now, when abortonclose option is enabled, we now take care to only
consider client aborts to prevent HTTP rules to yield.

Many thanks to @DirkyJerky for his detailed analysis.

This patch should fix the issue #3306. It should be backported as far as
2.8.
This commit is contained in:
Christopher Faulet 2026-03-27 11:18:39 +01:00
parent d1c7e56585
commit 27d7c69e87
2 changed files with 4 additions and 7 deletions

View file

@ -1114,7 +1114,7 @@ static int spoe_process_event(struct stream *s, struct spoe_context *ctx,
}
else if (ret == 0) {
if ((s->scf->flags & SC_FL_ERROR) ||
((s->scf->flags & (SC_FL_EOS|SC_FL_ABRT_DONE)) && proxy_abrt_close_def(s->be, 1))) {
((s->scf->flags & SC_FL_EOS) && proxy_abrt_close_def(s->be, 1))) {
ctx->status_code = SPOE_CTX_ERR_INTERRUPT;
spoe_stop_processing(agent, ctx);
spoe_handle_processing_error(s, agent, ctx, dir);

View file

@ -2828,8 +2828,7 @@ static enum rule_result http_req_get_intercept_rule(struct proxy *px, struct lis
int act_opts = 0;
if ((s->scf->flags & SC_FL_ERROR) ||
((s->scf->flags & (SC_FL_EOS|SC_FL_ABRT_DONE)) &&
proxy_abrt_close_def(px, 1)))
((s->scf->flags & SC_FL_EOS) && proxy_abrt_close_def(px, 1)))
act_opts |= ACT_OPT_FINAL | ACT_OPT_FINAL_EARLY;
/* If "the current_rule_list" match the executed rule list, we are in
@ -3020,8 +3019,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) ||
((s->scf->flags & (SC_FL_EOS|SC_FL_ABRT_DONE)) &&
proxy_abrt_close_def(px, 1)))
((s->scf->flags & SC_FL_EOS) && proxy_abrt_close_def(px, 1)))
act_opts |= ACT_OPT_FINAL | ACT_OPT_FINAL_EARLY;
/* If "the current_rule_list" match the executed rule list, we are in
@ -4356,8 +4354,7 @@ enum rule_result http_wait_for_msg_body(struct stream *s, struct channel *chn,
/* we get here if we need to wait for more data */
if ((s->scf->flags & SC_FL_ERROR) ||
((s->scf->flags & (SC_FL_EOS|SC_FL_ABRT_DONE)) &&
proxy_abrt_close_def(s->be, 1)))
((s->scf->flags & SC_FL_EOS) && proxy_abrt_close_def(s->be, 1)))
ret = HTTP_RULE_RES_CONT;
else if (!(chn_prod(chn)->flags & (SC_FL_ERROR|SC_FL_EOS|SC_FL_ABRT_DONE))) {
if (!tick_isset(chn->analyse_exp))