BUG/MINOR: mux-h2: add missing traces on failed headers decoding
In case HPACK cannot be decoded, logs are emitted but there's no info in the H2 traces, so let's add them. This may be backported to all supported versions.
This commit is contained in:
parent
f43f36da5b
commit
17c630b846
|
@ -2585,6 +2585,7 @@ static struct h2s *h2c_frt_handle_headers(struct h2c *h2c, struct h2s *h2s)
|
|||
error = h2c_decode_headers(h2c, &h2s->rxbuf, &h2s->flags, &body_len, NULL);
|
||||
/* unrecoverable error ? */
|
||||
if (h2c->st0 >= H2_CS_ERROR) {
|
||||
TRACE_USER("Unrecoverable error decoding H2 trailers", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_STRM_NEW|H2_EV_STRM_END, h2c->conn, 0, &rxbuf);
|
||||
sess_log(h2c->conn->owner);
|
||||
goto out;
|
||||
}
|
||||
|
@ -2602,6 +2603,7 @@ static struct h2s *h2c_frt_handle_headers(struct h2c *h2c, struct h2s *h2s)
|
|||
*/
|
||||
sess_log(h2c->conn->owner);
|
||||
h2s_error(h2s, H2_ERR_INTERNAL_ERROR);
|
||||
TRACE_USER("Stream error decoding H2 trailers", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_STRM_NEW|H2_EV_STRM_END, h2c->conn, 0, &rxbuf);
|
||||
h2c->st0 = H2_CS_FRAME_E;
|
||||
goto out;
|
||||
}
|
||||
|
@ -2630,6 +2632,7 @@ static struct h2s *h2c_frt_handle_headers(struct h2c *h2c, struct h2s *h2s)
|
|||
|
||||
/* unrecoverable error ? */
|
||||
if (h2c->st0 >= H2_CS_ERROR) {
|
||||
TRACE_USER("Unrecoverable error decoding H2 request", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_STRM_NEW|H2_EV_STRM_END, h2c->conn, 0, &rxbuf);
|
||||
sess_log(h2c->conn->owner);
|
||||
goto out;
|
||||
}
|
||||
|
@ -2747,8 +2750,10 @@ static struct h2s *h2c_bck_handle_headers(struct h2c *h2c, struct h2s *h2s)
|
|||
}
|
||||
|
||||
/* unrecoverable error ? */
|
||||
if (h2c->st0 >= H2_CS_ERROR)
|
||||
if (h2c->st0 >= H2_CS_ERROR) {
|
||||
TRACE_USER("Unrecoverable error decoding H2 HEADERS", H2_EV_RX_FRAME|H2_EV_RX_HDR, h2c->conn, h2s);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (h2s->st != H2_SS_OPEN && h2s->st != H2_SS_HLOC) {
|
||||
/* RFC7540#5.1 */
|
||||
|
|
Loading…
Reference in New Issue