From e42241ed2b1df77beb1817eb9bcc46bab793f25c Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Mon, 24 Jul 2023 11:37:10 +0200 Subject: [PATCH] BUG/MEDIUM: h3: Properly report a C-L header was found to the HTX start-line 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/h3.c b/src/h3.c index 7393ae728..42289c0a5 100644 --- 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. */