]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h1: Don't report an H1C error on client timeout
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 6 Feb 2023 17:14:47 +0000 (18:14 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 13 Feb 2023 08:43:38 +0000 (09:43 +0100)
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.

src/mux_h1.c

index 1dea69937d26f2b1e31c4c878502b02171194aa1..00538ca32160c62fdb345edb3004eff539067d57 100644 (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 */
                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);
                        if (h1_handle_req_tout(h1c))
                                h1_send(h1c);