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.
This commit is contained in:
Willy Tarreau 2021-06-17 08:29:14 +02:00
parent ee4684f65b
commit 29268e9a3c

View File

@ -2698,6 +2698,8 @@ static struct h2s *h2c_frt_handle_headers(struct h2c *h2c, struct h2s *h2s)
goto send_rst; 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 /* 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, * 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. * 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) if (h2s->id > h2c->max_id)
h2c->max_id = h2s->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; return h2s;
conn_err: conn_err: