mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-02-05 09:21:42 +01:00
Handle properly websocket streams if the server uses an ALPN with both h1 and h2. Add a new field h2_ws in the server structure. If set to off, reuse is automatically disable on backend and ALPN is forced to http1.x if possible. Nothing is done if on. Implement a mechanism to be able to use a different http version for websocket streams. A new server member <ws> represents the algorithm to select the protocol. This can overrides the server <proto> configuration. If the connection uses ALPN for proto selection, it is updated for websocket streams to select the right protocol. Three mode of selection are implemented : - auto : use the same protocol between non-ws and ws streams. If ALPN is use, try to update it to "http/1.1"; this is only done if the server ALPN contains "http/1.1". - h1 : use http/1.1 - h2 : use http/2.0; this requires the server to support RFC8441 or an error will be returned by haproxy.