From: Christopher Faulet Date: Mon, 2 Oct 2023 06:58:48 +0000 (+0200) Subject: BUG/MINOR: h1-htx: Keep flags about C-L/T-E during HEAD response parsing X-Git-Tag: v2.9-dev7~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b6c32f1e04721903bab4dff5d93d86b17eca9ecc;p=thirdparty%2Fhaproxy.git 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. --- 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;