]> git.kaiwu.me - haproxy.git/commit
REGTESTS: http-messaging: test the option http-no-delay
authorWilly Tarreau <w@1wt.eu>
Tue, 22 Sep 2026 20:39:21 +0000 (20:39 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 15:25:37 +0000 (17:25 +0200)
commit527450fb3696cd77658a58b751fd1cca477492bf
tree18b483d87150e92eec6a227429d6f4253d59e5b3
parent4a26cb8bb4ad92a60f3f976eb8d7f09473730232
REGTESTS: http-messaging: test the option http-no-delay

The option was listed as out of reach because it only changes when the
data are pushed out and because no vtest assertion expresses a duration.
It turns out haproxy measures that duration itself: %Tt reports the
whole transaction, so it is enough to build an exchange whose length is
exactly the delay being looked for and to let the syslog expect count
the digits.

The server sends a chunked response, then its first chunk alone, and
only terminates the message once a barrier tells it the client has
received that chunk. Without the option, the incomplete message is held
by the system for its cork timeout, which is 200 ms on Linux, and the
transaction lasts that long; with the option it lasts zero millisecond.
Five runs here gave 200 to 222 ms against 0, so a three digit value
against a one or two digit one leaves a comfortable margin.

The delay comes from MSG_MORE, which is compiled out as a no-op where
it does not exist, leaving nothing to observe, hence the excluded
targets.
reg-tests/http-messaging/http_no_delay.vtc [new file with mode: 0644]