From 692a6c2e69fb33e4fc3c783ec9b688cda5a76956 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Fri, 7 Feb 2020 10:22:31 +0100 Subject: [PATCH] BUG/MINOR: http-act: Set stream error flag before returning an error In action_http_set_status(), when a rewrite error occurred, the stream error flag must be set before returning the error. No need to backport this patch except if commit 333bf8c33 ("MINOR: http-rules: Set SF_ERR_PRXCOND termination flag when a header rewrite fails") is backported. This bug was reported in issue #491. --- src/http_act.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http_act.c b/src/http_act.c index 40af1eab91..dc8c33ddda 100644 --- a/src/http_act.c +++ b/src/http_act.c @@ -305,9 +305,9 @@ static enum act_return action_http_set_status(struct act_rule *rule, struct prox _HA_ATOMIC_ADD(&__objt_server(s->target)->counters.failed_rewrites, 1); if (!(s->txn->req.flags & HTTP_MSGF_SOFT_RW)) { - return ACT_RET_ERR; if (!(s->flags & SF_ERR_MASK)) s->flags |= SF_ERR_PRXCOND; + return ACT_RET_ERR; } }