From: Olivier Houchard Date: Wed, 18 Nov 2026 12:44:29 +0000 (+0100) Subject: REGTESTS: http-messaging: send h1_big_chunk_size_line request at once X-Git-Tag: v3.5-dev13~14 X-Git-Url: https://git.kaiwu.me/web//%22?a=commitdiff_plain;h=586d0eef7da496cdb4f0658fbdda6c54af831979;p=haproxy.git REGTESTS: http-messaging: send h1_big_chunk_size_line request at once The test expects the headers and the chunk-size line to fill the buffer on the first read, so that the request is rejected before being forwarded. But they were sent as ~986 small writes, and when haproxy received them in two parts (seen on FreeBSD CI), the first read did not fill the buffer: the headers were forwarded and the server's 200 was logged instead of the expected 400. Let's send the whole request in a single write, with a chunk-size line longer than the buffer. --- diff --git a/reg-tests/http-messaging/h1_big_chunk_size_line.vtc b/reg-tests/http-messaging/h1_big_chunk_size_line.vtc index 24b4da513..f5173b9a3 100644 --- a/reg-tests/http-messaging/h1_big_chunk_size_line.vtc +++ b/reg-tests/http-messaging/h1_big_chunk_size_line.vtc @@ -48,11 +48,13 @@ haproxy h1 -conf { http-request return status 200 } -start -# 42 + 984 + 2 = 1028 bytes: too long for a 1024-byte buffer +# headers and a 1102-byte chunk-size line in a single write +shell { + awk 'BEGIN { for (i = 0; i < 1100; i++) printf "0"; printf "\r\n" }' > ${tmpdir}/line +} + client c1 -connect ${h1_li1_sock} { - txreq -req POST -url /big -hdr "Transfer-Encoding: chunked" -nolen - send_n 984 "0" - send "\r\n" + txreq -req POST -url /big -hdr "Transfer-Encoding: chunked" -nolen -bodyfrom ${tmpdir}/line } -run # a valid request must still work