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.
This commit is contained in:
Christopher Faulet 2023-07-24 11:37:10 +02:00
parent adb96fd9ff
commit e42241ed2b

View File

@ -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.
*/