]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-h2/traces: print the size of the DATA frames
authorWilly Tarreau <w@1wt.eu>
Thu, 3 Oct 2024 14:04:04 +0000 (16:04 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 12 Oct 2024 14:29:15 +0000 (16:29 +0200)
DATA frames produce a special trace with the amount of transferred data
in arg4, but this was not reported by h2_trace(). This commit just adds
it.

src/mux_h2.c

index 93066eb06e6cdd7853f95d0cce3e95dd3e5fdfbf..c58b6fb7e87d9532458a095604a69df3601f8da6 100644 (file)
@@ -582,6 +582,9 @@ static void h2_trace(enum trace_level level, uint64_t mask, const struct trace_s
                        if (h2s->id && h2s->errcode)
                                chunk_appendf(&trace_buf, " err=%s/%02x", h2_err_str(h2s->errcode), h2s->errcode);
                }
+
+               if ((mask & H2_EV_RX_DATA) && level == TRACE_LEVEL_DATA)
+                       chunk_appendf(&trace_buf, " data=%llu", (ullong)a4);
        }
 
        /* Let's dump decoded requests and responses right after parsing. They