]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: log: also wait for the response when logging response headers
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Apr 2026 06:22:58 +0000 (08:22 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Apr 2026 06:22:58 +0000 (08:22 +0200)
A typo in commit e51be30f78 ("BUG/MINOR: log: consider format expression
dependencies to decide when to log") made HRSHP appear twice (persistent
response) while the second one ought to be HRSHV (volatile response, e.g.
header values). This is harmless in practice since logs always wait for
at least headers.

This should be backported wherever the patch above was backported.

src/log.c

index ad435dddaff2e96ef9555fd9bc65872c880a3c02..c4bac892c74d1412b28eeb8107c406109d7f817d 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -1114,7 +1114,7 @@ int lf_expr_postcheck(struct lf_expr *lf_expr, struct proxy *px, char **err)
                                px->to_log |= LW_REQ;
 
                        /* anything involving the response needs to happen at response time */
-                       if (expr->fetch->use & (SMP_USE_HRSHP|SMP_USE_HRSHP|SMP_USE_HRSBO))
+                       if (expr->fetch->use & (SMP_USE_HRSHP|SMP_USE_HRSHV|SMP_USE_HRSBO))
                                px->to_log |= LW_RESP;
 
                        /* anything involving the end of the response needs to happen after final bytes */