]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: sample: fix backend direction flags consecutive to last fix
authorWilly Tarreau <w@1wt.eu>
Sat, 16 Oct 2021 12:41:09 +0000 (14:41 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 16 Oct 2021 12:41:09 +0000 (14:41 +0200)
Commit 7a06ffb85 ("BUG/MEDIUM: sample: Cumulate frontend and backend
sample validity flags") introduced a typo confusing the request and
the response direction when checking for validity of a rule applied
to a backend. This was reported by Coverity in issue #1417.

This needs to be backported where the patch above is backported.

src/http_htx.c

index 484b424862a3872a9bc73f9529f25267ecc66887..bfdcaef8631a29ab8b06d70c3d05730887468984 100644 (file)
@@ -1410,7 +1410,7 @@ struct http_reply *http_parse_http_reply(const char **args, int *orig_arg, struc
                if (px->cap & PR_CAP_FE)
                        cap |= ((px->conf.args.ctx == ARGC_HRQ) ? SMP_VAL_FE_HRQ_HDR : SMP_VAL_FE_HRS_HDR);
                if (px->cap & PR_CAP_BE)
-                       cap |= ((px->conf.args.ctx == ARGC_HRQ) ? SMP_VAL_BE_HRS_HDR : SMP_VAL_BE_HRS_HDR);
+                       cap |= ((px->conf.args.ctx == ARGC_HRQ) ? SMP_VAL_BE_HRQ_HDR : SMP_VAL_BE_HRS_HDR);
        }
 
        cur_arg = *orig_arg;