From d8a44d0b243f7f7ab993e42a09401516eb18740b Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 2 Sep 2022 11:15:37 +0200 Subject: [PATCH] BUG/MINOR: h2: properly set the direction flag on HTX response In 1.9-dev, a new flag was introduced on the start line with commit f1ba18d7b ("MEDIUM: htx: Don't rely on h1_sl anymore except during H1 header parsing") to designate a response message: HTX_SL_F_IS_RESP. Unfortunately as it was done in parallel to the mux_h2 support for the backend, it was never integrated there. It was not used by then so this remained unnoticed for a while. However the http_client now uses it, and missing that flag prevents it from using the H2 mux, so let's properly add it. There's no point in backporting this far away, but since the http_client is fully operational in 2.6 it would make sense to backport this fix at least there to secure the code. --- src/h2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/h2.c b/src/h2.c index c191881f2..7163a4427 100644 --- a/src/h2.c +++ b/src/h2.c @@ -582,7 +582,7 @@ int h2_make_htx_request(struct http_hdr *list, struct htx *htx, unsigned int *ms */ static struct htx_sl *h2_prepare_htx_stsline(uint32_t fields, struct ist *phdr, struct htx *htx, unsigned int *msgf) { - unsigned int status, flags = HTX_SL_F_NONE; + unsigned int status, flags = HTX_SL_F_IS_RESP; struct htx_sl *sl; struct ist stat;