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

The option only appeared in other tests as a convenient way to get rid
of the idle connections, its own behavior was never checked, and
"option http-pretend-keepalive", which modifies it, was not covered
either.

The five proxies here cover the four ways it can be declared. The side
whose connection is closed is the one the option is declared on: the
client one for a frontend, the server one for a backend, both for a
listener, and the "no option" form undoes what a defaults section had
set. The header it adds in that direction is checked by the server for
the request side and by the client for the response side.

Whether the client connection was closed is directly observable, and
whether the server one was is reported by bc_reused, since a connection
which was closed cannot be reused by the next request: the frontend
case reuses its server connection while the listener case cannot. This
is also how "http-pretend-keepalive" is checked, the server not seeing
the header while its connection is closed all the same.
reg-tests/http-messaging/httpclose.vtc [new file with mode: 0644]