BUG/MINOR: http_ana: Report -1 for %Tr for invalid response only
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 18 Nov 2024 21:37:52 +0000 (22:37 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 22 Nov 2024 14:40:07 +0000 (15:40 +0100)
commit9464b240ed1fb593232b8c2979ef801bba41d63e
tree859e22f6ebb8e17f2a7615931c4a9331ac9a658e
parent598c1406501b305bfb8c61967bd139e367ed5794
BUG/MINOR: http_ana: Report -1 for %Tr for invalid response only

The server response time is erroneously reported as -1 when it is
intercepted by HAProxy.

As stated in the documentation, the server response time is reported as -1
when the last response header was never seen. It happens when a server
timeout is triggered before the server managed to process the request. It
also happens if the response is invalid. This may be reported by the mux
during the response parsing, but also by the HTTP analyzers. However, in
this last case, the response time must only be reported as -1 on 502.

This patch must be backported to all stable versions. It should fix the
issue #2384.

(cherry picked from commit 5863d33fce702c46b77c07d4ea82e036b11417a6)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/http_ana.c