]> git.kaiwu.me - haproxy.git/commitdiff
Revert "BUG/MINOR: mux-h2: condition the processing of 8441 extension to global setting"
authorWilly Tarreau <w@1wt.eu>
Thu, 7 May 2026 15:06:13 +0000 (17:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 7 May 2026 15:34:39 +0000 (17:34 +0200)
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.

src/mux_h2.c

index c89d184a4705258a9f6d36c8395c508a683223fe..a04fa8f90459e531963028c9fe8a9e8068759deb 100644 (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;
                }