]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: h3: Properly report a C-L header was found to the HTX start-line
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 24 Jul 2023 09:37:10 +0000 (11:37 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 24 Jul 2023 09:58:35 +0000 (11:58 +0200)
When H3 HEADERS frames are converted to HTX, if a Content-Length header was
found, the HTX start-line must be notified by setting HTX_SL_F_CLEN flag.
Some components may rely on this flag to know there is a content-length
without looping on headers to get the info.

Among other this, it is mandatory for the FCGI multiplexer because it must
announce the message body length.

This patch must be backported as far as 2.6.

src/h3.c

index 7393ae728e2bf184224fea0f76a5c961678486f4..42289c0a5ec71373ba9d171c14a5abefa0179fad 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -613,6 +613,7 @@ static ssize_t h3_headers_to_htx(struct qcs *qcs, const struct buffer *buf,
                        }
 
                        h3s->flags |= H3_SF_HAVE_CLEN;
+                       sl->flags |= HTX_SL_F_CLEN;
                        /* This will fail if current frame is the last one and
                         * content-length is not null.
                         */