]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: connection: use the websocket mux after the handshake too
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 27 Nov 2026 13:12:13 +0000 (14:12 +0100)
committerOlivier Houchard <cognet@ci0.org>
Fri, 27 Nov 2026 13:05:55 +0000 (14:05 +0100)
commit65dc8abe0238bfbe65a2d5da5b696a7bfd294fde
treee91cfc1a635f7cdc572bf51e8b1e060a1c8c8834
parent1d9f1b8036ee912c390656eb6c48b5663ed8c25b
BUG/MEDIUM: connection: use the websocket mux after the handshake too

When the mux is created after the handshake, conn_create_mux() ignores
the "ws" setting of the server and uses its "proto". With a server using
"ssl alpn h2 proto h2 ws h1", a websocket connection gets its ALPN forced
to http/1.1, then an H2 mux, and every websocket request ends in a 502.

Let's give the websocket mux to conn_install_mux_be() there too, as
connect_server() does. This is a regression from commit a0db93f3d
("MEDIUM: backend: delay MUX init with ALPN even if proto is forced") in
3.3-dev2, and it happens for every websocket since commit 73ce20faa
("BUG/MEDIUM: server: Don't use the cached ALPN for websocket"). This
configuration was suggested as a workaround in github issue #3473.

This must be backported to 3.3.
src/connection.c