]> git.kaiwu.me - haproxy.git/commit
REGTESTS: mux-h1: check the H2 preface received in several segments
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 1 Dec 2026 13:32:27 +0000 (14:32 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 3 Dec 2026 12:41:06 +0000 (13:41 +0100)
commit885ac950b02cfdd470f1d6789319b032d3a0ed05
tree9875a9f0c53c6d61a0c5b70dd3fcfa5d39bec25e
parent27327db883ef2c7752ad2dd617ab321c77e7e342
REGTESTS: mux-h1: check the H2 preface received in several segments

Follows commit "BUG/MINOR: mux-h1: support the H2 preface received in
several segments": an HTTP/2 prior-knowledge client sending its preface in
several segments on an HTTP/1 listener must still be upgraded.

The preface is sent as raw segments with sendhex, split at 18 and 23 bytes
(the lowest and the highest splits that used to fail), at 1 and 16 bytes,
and in several small segments. It is followed by a raw H2 request (SETTINGS
+ HEADERS with literal headers). A short delay is used between the
segments, otherwise they could be received at once. The upgrade is verified
on the backend side: the vtest client cannot initialize its H2 state after
a segmented preface (the first "stream" command always sends a preface). A
barrier is used to wait for the server before closing the client
connection. Two negative cases are also checked: a partial preface followed
by garbage and a preface-like magic, both answered with a 400.

It could be backported with the commit above.
reg-tests/http-messaging/h1_to_h2_upgrade_split_preface.vtc [new file with mode: 0644]