]> git.kaiwu.me - haproxy.git/commit
MEDIUM: h3: rely on the generic trailers parser
authorWilly Tarreau <w@1wt.eu>
Tue, 8 Sep 2026 12:23:54 +0000 (14:23 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 8 Sep 2026 12:52:24 +0000 (14:52 +0200)
commit25a11d345425be08cb01fec0eae5dfe8b423ee57
tree3be972b032d68cbefc5ea8526b484032f13d46fe
parent8499f76f50caedf52a9c79c6525f7a3ef881b3fb
MEDIUM: h3: rely on the generic trailers parser

h3_trailers_to_htx() performed exactly the same controls as the generic
http_trailers_to_htx() parser, but was relying on traces and glitches
for each failure case that was codified on the latter parser.

Let's just drop the parsing loop for a direct call to the function and
a check on the return codes to decide what trace/glitch to emit.

It's worth noting that H3_ERR_MESSAGE_ERROR is not set when failing to
add a header, not sure whether this is a design decision or an overlook.
In any case this behavior was preserved.

Note that pseudo-headers are detected on their syntax here, while h2
used to detect them on their assigned number, so this remains a tiny
difference between the two parsers at this point.

Regtests continue to pass.
src/h3.c