From b6c32f1e04721903bab4dff5d93d86b17eca9ecc Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Mon, 2 Oct 2023 08:58:48 +0200 Subject: [PATCH] BUG/MINOR: h1-htx: Keep flags about C-L/T-E during HEAD response parsing When a response to a HEAD request is parsed, flags to know if the content length is set or if the payload is chunked must be preserved.. It is important because of the previous fix. Otherwise, these headers will be removed from the response sent to the client. This patch must only backported if "BUG/MEDIUM: mux-h1; Ignore headers modifications about payload representation" is backported. --- src/h1_htx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/h1_htx.c b/src/h1_htx.c index 274fc39891..f0c525e677 100644 --- a/src/h1_htx.c +++ b/src/h1_htx.c @@ -292,7 +292,6 @@ static int h1_postparse_res_hdrs(struct h1m *h1m, union h1_sl *h1sl, struct htx else if ((h1m->flags & H1_MF_METH_HEAD) || (code >= 100 && code < 200) || (code == 204) || (code == 304)) { /* Responses known to have no body. */ - h1m->flags &= ~(H1_MF_CLEN|H1_MF_CHNK); h1m->flags |= H1_MF_XFER_LEN; h1m->curr_len = h1m->body_len = 0; flags |= HTX_SL_F_BODYLESS_RESP; -- 2.47.3