]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h2/traces: bring back the lost "rcvd H2 REQ" trace
authorWilly Tarreau <w@1wt.eu>
Thu, 17 Jun 2021 06:29:14 +0000 (08:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 17 Jun 2021 06:43:27 +0000 (08:43 +0200)
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

index 1150660b9c47f8b3cd8f1ab5a45ffb1074dfebe1..e09b0d97d655415a31b9ce61a51f73da6c5cd050 100644 (file)
@@ -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: