]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: mux-h1: only reset the session's timing info on the frontend side
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Oct 2026 08:58:15 +0000 (10:58 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 16 Oct 2026 17:10:26 +0000 (19:10 +0200)
commit31c153983ee0bbfeb40adacf9acfad552910bd51
tree4eca5143e0d8007eaaa7a091aac550aaa1dc4fa4
parent893a72800ab67bf0349f460594822d55b6e8a4d1
BUG/MINOR: mux-h1: only reset the session's timing info on the frontend side

When an H1 stream is detached, h1s_finish_detach() resets the session's
accept date, handshake and idle times so that the next request on the same
connection reports the right values. But this is also performed for backend
H1 streams, whose <sess> is the client's session. For an H1 frontend it does
not matter because the frontend stream is detached afterwards and resets
these values again. But for H2 and H3 frontends, the session is shared by
all streams of the client connection and the mux sets these values itself
when creating each stream. In this case the backend detach overwrites them,
so the next stream created on the client connection reports a wrong
accept/request date and idle time (%tr, %Ti, %Tt in logs): they are counted
from the end of the previous exchange with the server instead of from the
previous stream as the H2/H3 muxes intend.

For instance, with an H2 frontend and an H1 server, a client sending two
requests on the same connection, the first one taking 1 second, logs
"Ti=0 Tt=0" for the second one, instead of "Ti=1002 Tt=1002" with an H2
server or with this patch.

The timing info are now only reset for frontend H1 streams.

This patch may be backported to all supported versions.
src/mux_h1.c