]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: tcpcheck: Don't enable http_needed when parsing HTTP samples
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 26 Mar 2026 12:42:28 +0000 (13:42 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Apr 2026 14:34:37 +0000 (16:34 +0200)
In tcpchecks context, when HTTP sample expressions are parsed, there is no
reason to set the proxy's http_needed value to 1. This value is only used
for streams to allocate an HTTP txn.

This patch could be backported to all stable versions.

src/tcpcheck.c

index 57b13b415f0895d10c62a6a556479d4b4d3748d2..70861b6ef94545c5a6f99f7f64a8191d328f7db0 100644 (file)
@@ -2789,7 +2789,6 @@ struct tcpcheck_rule *parse_tcpcheck_connect(char **args, int cur_arg, struct pr
                                                  args[cur_arg], sample_src_names(port_expr->fetch->use));
                                        goto error;
                                }
-                               px->http_needed |= !!(port_expr->fetch->use & SMP_USE_HTTP_ANY);
                        }
                        else if (port > 65535 || port < 1) {
                                memprintf(errmsg, "expects a valid TCP port (from range 1 to 65535) or a sample expression, got %s.",
@@ -3590,7 +3589,6 @@ struct tcpcheck_rule *parse_tcpcheck_expect(char **args, int cur_arg, struct pro
                                          args[cur_arg], sample_src_names(status_expr->fetch->use));
                                        goto error;
                        }
-                       px->http_needed |= !!(status_expr->fetch->use & SMP_USE_HTTP_ANY);
                }
                else if (strcmp(args[cur_arg], "tout-status") == 0) {
                        if (in_pattern) {