]> git.kaiwu.me - haproxy.git/commit
MINOR: http-htx: add a new generic trailers parser
authorWilly Tarreau <w@1wt.eu>
Tue, 8 Sep 2026 06:48:53 +0000 (08:48 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 8 Sep 2026 12:50:50 +0000 (14:50 +0200)
commit28a00d7d248f1fe5cb03a01c515698c0fb4dbac5
treed6a8d95d19b1d80787b62f89cefa92b6043f8952
parent2cedce95ce01027a82259825b6b8875ae1600875
MINOR: http-htx: add a new generic trailers parser

http_trailers_to_htx() merges h2_make_htx_trailers() and
h3_trailers_to_htx() into a unified function that takes a fields list,
performs controls and adds them to HTX. It returns http_parser_status
codes so that the caller knows what happens. For now the function is
not ready to handle HTTP/1 because it unconditionally rejects upper
case letters in field names.

The parser uses two modes to detect pseudo-headers:
  - syntax-based (it starts with a colon)
  - number-based (an index number replaces the string)

This is because the former is used by h3, the latter by h2.
include/haproxy/http_htx.h
src/http_htx.c