]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http: Set brackets for the unlikely macro at the right place
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 20 Jul 2018 07:54:26 +0000 (09:54 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 20 Jul 2018 08:42:53 +0000 (10:42 +0200)
When test on the header "Early-Data" is made, the unlikely macro must encompass
the condition.

This patch must be backported in 1.8.

src/proto_http.c

index 117d27404af5919820bb51d9a5598f2a183272e3..56035b9cb2d25b53096c87ef7688da7d735beb8a 100644 (file)
@@ -3526,7 +3526,7 @@ int http_process_req_common(struct stream *s, struct channel *req, int an_bit, s
                    ci_head(&s->req), &txn->hdr_idx, &ctx)) {
                        if (unlikely(http_header_add_tail2(&txn->req,
                            &txn->hdr_idx, "Early-Data: 1",
-                           strlen("Early-Data: 1"))) < 0) {
+                           strlen("Early-Data: 1")) < 0)) {
                                goto return_bad_req;
                         }
                }