]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: h3: Increase max number of headers when sending headers
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 20 Nov 2024 16:14:56 +0000 (17:14 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 20 Nov 2024 16:44:22 +0000 (17:44 +0100)
In the same way than for the H2, the maximum number of headers that can be
encoded when headers are sent must be increased to match the limit imposed
when they are received.

Reasons are the sames. On receive path, the maximum number of headers
accepted must be higher than the configured limit to be able to handle
pseudo headers and cookies headers. On the sending path, the same limit must
be applied because the pseudo headers will consume some extra slots and the
cookie header could be splitted.

This patch should be backported as far as 2.6.

src/h3.c

index 59b632d1d88c7047826ca96669105e382ed46484..1006813c596af343936d8bbf88ebe76d7fdf0a31 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -1569,7 +1569,7 @@ static int h3_resp_headers_send(struct qcs *qcs, struct htx *htx)
        struct buffer outbuf;
        struct buffer headers_buf = BUF_NULL;
        struct buffer *res;
-       struct http_hdr list[global.tune.max_http_hdr];
+       struct http_hdr list[global.tune.max_http_hdr * 2];
        struct htx_sl *sl;
        struct htx_blk *blk;
        enum htx_blk_type type;