]> git.kaiwu.me - haproxy.git/commit
REGTEST: ssl: test tune.h2.fe.enabled and h2_enabled on two instances
authorWilly Tarreau <w@1wt.eu>
Mon, 12 Oct 2026 19:20:36 +0000 (19:20 +0000)
committerWilly Tarreau <w@1wt.eu>
Tue, 17 Nov 2026 10:08:46 +0000 (11:08 +0100)
commit5cd179322c2f84b4557e3aece5e8ea08c58f8313
tree61154a319f96efca42ce5d0af4d880f4bd16f10a
parentd47985ccccadef2ce71b72a0c285c13c49be4d55
REGTEST: ssl: test tune.h2.fe.enabled and h2_enabled on two instances

This test compares two haproxy instances, "hon" with the default setting
and "hoff" with "tune.h2.fe.enabled off", and sends them the same
requests. It verifies that on "hoff":
  - "h2" is never negotiated via ALPN, whether it comes from the default
    bind ALPN, an explicit "alpn" setting (even "h2" alone, which becomes
    equivalent to "no-alpn") or a crt-list entry, while it is on "hon";
  - an HTTP/1 frontend receiving the H2 preface responds a 405 instead of
    being upgraded as it is on "hon";
  - a "bind" line forcing "proto h2" closes its connections upon accept,
    while it serves H2 on "hon";
  - the h2_enabled sample fetch returns false, while it is true on "hon".

The upgrade is tested with haproxy itself as the H2 client because vtest
emits the preface again on the first "stream" block, and its "txpri" may
split it after the first empty line, which the H1 mux then parses as an
HTTP/1 request and rejects with a 400.

It should be backported with the "tune.h2.fe.enabled" setting and the
"h2_enabled" sample fetch.
reg-tests/ssl/certs/h2_fe_enabled.crt-list [new file with mode: 0644]
reg-tests/ssl/h2_fe_enabled.vtc [new file with mode: 0644]