BUG/MINOR: mux-h2/traces: bring back the lost "sent H2 REQ/RES" traces

In 2.4, commit d1ac2b90c ("MAJOR: htx: Remove the EOM block type and
use HTX_FL_EOM instead") changed the HTX processing to destroy the
blocks as they are processed. So the traces that were emitted at the
end of the send headers functions didn't have anything to show.

Let's move these traces earlier in the function, right before the HTX
processing, so that everything is still in place.

This should be backported to 2.4.
This commit is contained in:
Willy Tarreau 2021-06-17 08:40:04 +02:00
parent 29268e9a3c
commit 3a53707160
1 changed files with 4 additions and 2 deletions

View File

@ -5131,6 +5131,8 @@ static size_t h2s_frt_make_resp_headers(struct h2s *h2s, struct htx *htx)
}
}
TRACE_USER("sent H2 response ", H2_EV_TX_FRAME|H2_EV_TX_HDR, h2c->conn, h2s, htx);
/* remove all header blocks including the EOH and compute the
* corresponding size.
*/
@ -5161,7 +5163,6 @@ static size_t h2s_frt_make_resp_headers(struct h2s *h2s, struct htx *htx)
outbuf.area[4] |= H2_F_HEADERS_END_STREAM;
/* commit the H2 response */
TRACE_USER("sent H2 response ", H2_EV_TX_FRAME|H2_EV_TX_HDR, h2c->conn, h2s, htx);
b_add(mbuf, outbuf.data);
/* indicates the HEADERS frame was sent, except for 1xx responses. For
@ -5538,6 +5539,8 @@ static size_t h2s_bck_make_req_headers(struct h2s *h2s, struct htx *htx)
}
}
TRACE_USER("sent H2 request ", H2_EV_TX_FRAME|H2_EV_TX_HDR, h2c->conn, h2s, htx);
/* remove all header blocks including the EOH and compute the
* corresponding size.
*/
@ -5568,7 +5571,6 @@ static size_t h2s_bck_make_req_headers(struct h2s *h2s, struct htx *htx)
outbuf.area[4] |= H2_F_HEADERS_END_STREAM;
/* commit the H2 response */
TRACE_USER("sent H2 request ", H2_EV_TX_FRAME|H2_EV_TX_HDR, h2c->conn, h2s, htx);
b_add(mbuf, outbuf.data);
h2s->flags |= H2_SF_HEADERS_SENT;
h2s->st = H2_SS_OPEN;