diff --git a/src/cfgparse.c b/src/cfgparse.c index ffff9cc6b..9a03a02bb 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -3484,8 +3484,8 @@ out_uri_auth_compat: int mode = (1 << (curproxy->mode == PR_MODE_HTTP)); const struct mux_proto_list *mux_ent; - /* Special case for HTX because it is still experimental */ - if (curproxy->options2 & PR_O2_USE_HTX) + /* Special case for HTX because legacy HTTP still exists */ + if (mode == PROTO_MODE_HTTP && (curproxy->options2 & PR_O2_USE_HTX)) mode = PROTO_MODE_HTX; if (!bind_conf->mux_proto) @@ -3513,8 +3513,8 @@ out_uri_auth_compat: int mode = (1 << (curproxy->mode == PR_MODE_HTTP)); const struct mux_proto_list *mux_ent; - /* Special case for HTX because it is still experimental */ - if (curproxy->options2 & PR_O2_USE_HTX) + /* Special case for HTX because legacy HTTP still exists */ + if (mode == PROTO_MODE_HTTP && (curproxy->options2 & PR_O2_USE_HTX)) mode = PROTO_MODE_HTX; if (!newsrv->mux_proto) diff --git a/src/http_htx.c b/src/http_htx.c index 21a5b57f4..8a407cdff 100644 --- a/src/http_htx.c +++ b/src/http_htx.c @@ -714,7 +714,7 @@ static int http_htx_init(void) int err_code = 0; for (px = proxies_list; px; px = px->next) { - if (!(px->options2 & PR_O2_USE_HTX)) + if (px->mode != PR_MODE_HTTP || !(px->options2 & PR_O2_USE_HTX)) continue; for (rc = 0; rc < HTTP_ERR_SIZE; rc++) {