mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
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.
This commit is contained in:
parent
f89ba27caa
commit
b6c32f1e04
@ -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) ||
|
else if ((h1m->flags & H1_MF_METH_HEAD) || (code >= 100 && code < 200) ||
|
||||||
(code == 204) || (code == 304)) {
|
(code == 204) || (code == 304)) {
|
||||||
/* Responses known to have no body. */
|
/* Responses known to have no body. */
|
||||||
h1m->flags &= ~(H1_MF_CLEN|H1_MF_CHNK);
|
|
||||||
h1m->flags |= H1_MF_XFER_LEN;
|
h1m->flags |= H1_MF_XFER_LEN;
|
||||||
h1m->curr_len = h1m->body_len = 0;
|
h1m->curr_len = h1m->body_len = 0;
|
||||||
flags |= HTX_SL_F_BODYLESS_RESP;
|
flags |= HTX_SL_F_BODYLESS_RESP;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user