Revert "BUG/MINOR: mux-h2: condition the processing of 8441 extension to global setting"

This reverts commit 9986ad65a4af0b5e4212f1d12e108090490a8c2d.

The protocol was not super clear on one point when compared to RFC9113
and our internal setting GTUNE_DISABLE_H2_WEBSOCKET. While RFC9113 says
that protocol extensions are negotiated, RFC8441 is only advertised by
the server, which thus doesn't know if the client supports it or not
until it faces it. In addition, GTUNE_DISABLE_H2_WEBSOCKET doesn't
apply to the protocol support as it name seems to imply, but to the
frontend only since the corresponding option is
"h2-workaround-bogus-websocket-clients". As such, haproxy should not
expect the client to advertise anything regarding the setting, and
should not consider the option when receiving the server's setting.

This needs to be backported to 2.6 where the commit above was
backported.
This commit is contained in:
Willy Tarreau 2026-05-07 17:06:13 +02:00
parent 157e24272f
commit b587ea1f27

View File

@ -2935,8 +2935,7 @@ static int h2c_handle_settings(struct h2c *h2c)
}
break;
case H2_SETTINGS_ENABLE_CONNECT_PROTOCOL:
/* setting only considered if rfc8441 not disabled */
if (arg == 1 && !(global.tune.options & GTUNE_DISABLE_H2_WEBSOCKET))
if (arg == 1)
h2c->flags |= H2_CF_RCVD_RFC8441;
break;
}