]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-h2/traces: also suggest invalid header upon parsing error
authorWilly Tarreau <w@1wt.eu>
Tue, 8 Aug 2023 13:27:02 +0000 (15:27 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 8 Aug 2023 17:02:24 +0000 (19:02 +0200)
Historically the parsing error used to apply only to too large headers,
so this is what has been reported in traces. But nowadays we can also
reject invalid characters, and when this happens the trace is a bit
misleading, so let's mention "or invalid".

src/mux_h2.c

index 4120e0040541c18c8770be2ae14b53c1341e4040..63b9a805c14a80d654313af6a3320e151a3caa0f 100644 (file)
@@ -4940,7 +4940,7 @@ next_frame:
 
        if (outlen < 0 || htx_free_space(htx) < global.tune.maxrewrite) {
                /* too large headers? this is a stream error only */
-               TRACE_STATE("message headers too large", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_H2S_ERR|H2_EV_PROTO_ERR, h2c->conn);
+               TRACE_STATE("message headers too large or invalid", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_H2S_ERR|H2_EV_PROTO_ERR, h2c->conn);
                htx->flags |= HTX_FL_PARSING_ERROR;
                goto fail;
        }