BUG/MINOR: mux-h1: Don't report an H1C error on client timeout

When a client timeout is reported by the H1 mux, it is not an error but an
abort. Thus, H1C_F_ERROR flag must not be set. It is espacially important to
not inhibit the send. Because of this bug, a 408-Request-time-out is
reported in logs but the error message is not sent to the client.

This patch must be backported to 2.7.
This commit is contained in:
Christopher Faulet 2023-02-06 18:14:47 +01:00
parent 5b74f99383
commit 3eff752f6f

View File

@ -3262,7 +3262,6 @@ struct task *h1_timeout_task(struct task *t, void *context, unsigned int state)
/* Try to send an error to the client */ /* Try to send an error to the client */
if (h1c->state != H1_CS_CLOSING && !(h1c->flags & (H1C_F_IS_BACK|H1C_F_ERROR|H1C_F_ABRT_PENDING))) { if (h1c->state != H1_CS_CLOSING && !(h1c->flags & (H1C_F_IS_BACK|H1C_F_ERROR|H1C_F_ABRT_PENDING))) {
h1c->flags |= H1C_F_ERROR;
TRACE_DEVEL("timeout error detected", H1_EV_H1C_WAKE|H1_EV_H1C_ERR, h1c->conn, h1c->h1s); TRACE_DEVEL("timeout error detected", H1_EV_H1C_WAKE|H1_EV_H1C_ERR, h1c->conn, h1c->h1s);
if (h1_handle_req_tout(h1c)) if (h1_handle_req_tout(h1c))
h1_send(h1c); h1_send(h1c);