From: Christopher Faulet Date: Mon, 24 Jul 2023 09:37:10 +0000 (+0200) Subject: BUG/MEDIUM: h3: Properly report a C-L header was found to the HTX start-line X-Git-Tag: v2.9-dev3~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e42241ed2b1df77beb1817eb9bcc46bab793f25c;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/h3.c b/src/h3.c index 7393ae728e..42289c0a5e 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. */