]> git.kaiwu.me - haproxy.git/commit
REGTESTS: http-messaging: test the strict parsing of HTTP/1 chunk extensions
authorWilly Tarreau <w@1wt.eu>
Mon, 23 Nov 2026 18:20:43 +0000 (18:20 +0000)
committerWilly Tarreau <w@1wt.eu>
Tue, 24 Nov 2026 09:50:37 +0000 (10:50 +0100)
commitda7eb7b3976287c9c6e9c1913bcb522553021409
tree65769734cf742cd9480aab2ebe7d3f93b6af9a42
parent896e7ca258adb6259680211b3ff7b27f0fcd0424
REGTESTS: http-messaging: test the strict parsing of HTTP/1 chunk extensions

Chunk extensions must exactly follow the BNF from RFC9112#7.1.1. This
sends 20 valid and 37 invalid chunk-size lines (on regular and last
chunks) in requests, and a few of them in responses, and checks that
valid ones are forwarded with their body while invalid ones are
rejected with a 400 (or a 502 for responses) without reaching the
server.

Each message is sent in a single write so that it is parsed by the
contiguous chunks parser (h1_parse_full_contig_chunks()). The generic
h1_parse_chunk_size() is only used when the buffer wraps or the HTX is
full, which cannot reliably be reproduced here.
reg-tests/http-messaging/h1_chunk_extensions.vtc [new file with mode: 0644]