]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mux-h2: update tracked counters with req cnt/req err
authorWilly Tarreau <w@1wt.eu>
Fri, 20 Oct 2023 16:38:34 +0000 (18:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 20 Oct 2023 19:09:12 +0000 (21:09 +0200)
commit380f115a4aaa76d5496028290061407fa7cabd9b
treee00ec8fe99c32da9e6b9c6e0d9132865d050a938
parent250b630fb933d652533487cba9e2ae448582b550
BUG/MINOR: mux-h2: update tracked counters with req cnt/req err

Originally H2 would transfer everything to H1 and parsing errors were
handled there, so that if there was a track-sc rule in effect, the
counters would be updated as well. As we started to add more and more
HTTP-compliance checks at the H2 layer, then switched to HTX, we
progressively lost this ability. It's a bit annoying because it means
we will not maintain accurate error counters for a given source, for
example.

This patch adds the calls to session_inc_http_req_ctr() and
session_inc_http_err_ctr() when needed (i.e. when failing to parse
an HTTP request since all other cases are handled by the stream),
just like mux-h1 does. The same should be done for mux-h3 by the
way.

This can be backported to recent stable versions. It's not exactly a
bug, rather a missing feature in that we had never updated this counter
for H2 till now, but it does make sense to do it especially based on
what the doc says about its usage.
src/mux_h2.c