]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: http-ana: count response body failures only once in http_fail_cnt
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 23 Sep 2026 04:36:13 +0000 (04:36 +0000)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 23 Sep 2026 12:05:26 +0000 (14:05 +0200)
commit49c353d06a9c9dfed566837b0a3822fcb58fe54d
tree40175faa3754d3608920f7ae0540e2d36a925031
parent2b8598b46df10e99196061f2866ec97ac56aa75b
BUG/MINOR: http-ana: count response body failures only once in http_fail_cnt

In http_response_forward_body(), the return_srv_abort and return_bad_res
labels incremented the http_fail_cnt counters of the tracked stick counters,
then continued to the return_error label, which incremented them again. So a
server aborting in the middle of the body, or an invalid response body, was
counted twice.And since return_cli_abort and return_int_err also end at
return_error, a client aborting a download, or an internal error, was counted
as a server failure, while the counter is documented to only count the
failures caused by the servers.

Let's remove the increment from return_error. A reg-test is added with a
server closing in the middle of the body and a client aborting a download.

This was introduced by f2b02cfd9 ("MAJOR: http-ana: Review error handling
during HTTP payload forwarding") so this must be backported up to 2.8.
reg-tests/http-messaging/http_fail_cnt_body.vtc [new file with mode: 0644]
src/http_ana.c