From 29268e9a3c0937b8a285c19942e3b024ab5c8af3 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 17 Jun 2021 08:29:14 +0200 Subject: [PATCH] BUG/MINOR: mux-h2/traces: bring back the lost "rcvd H2 REQ" trace Since commit 7d013e796 ("BUG/MEDIUM: mux-h2: Xfer rxbuf to the upper layer when creating a front stream"), the rxbuf is lost during the call to h2c_frt_stream_new(), so the trace that happens later cannot find a request there and we've lost the useful part indicating what the request looked like. Let's move the trace before this call. This should be backported to 2.4. --- src/mux_h2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mux_h2.c b/src/mux_h2.c index 1150660b9c..e09b0d97d6 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -2698,6 +2698,8 @@ static struct h2s *h2c_frt_handle_headers(struct h2c *h2c, struct h2s *h2s) goto send_rst; } + TRACE_USER("rcvd H2 request ", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_STRM_NEW, h2c->conn, 0, &rxbuf); + /* Note: we don't emit any other logs below because ff we return * positively from h2c_frt_stream_new(), the stream will report the error, * and if we return in error, h2c_frt_stream_new() will emit the error. @@ -2730,7 +2732,6 @@ static struct h2s *h2c_frt_handle_headers(struct h2c *h2c, struct h2s *h2s) if (h2s->id > h2c->max_id) h2c->max_id = h2s->id; - TRACE_USER("rcvd H2 request ", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_STRM_NEW, h2c->conn, 0, &rxbuf); return h2s; conn_err: -- 2.47.3