MINOR: h1-htx: Declare successful tunnel establishment as bodyless

Successful responses to a CONNECT or to a upgrade request have no payload.
Be explicit on this point by setting HTX_SL_F_BODYLESS_RESP flag on the HTX
start-line.
This commit is contained in:
Christopher Faulet 2023-10-02 10:42:32 +02:00
parent b6c32f1e04
commit 225a4d02e1
1 changed files with 1 additions and 0 deletions

View File

@ -288,6 +288,7 @@ static int h1_postparse_res_hdrs(struct h1m *h1m, union h1_sl *h1sl, struct htx
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;
}
else if ((h1m->flags & H1_MF_METH_HEAD) || (code >= 100 && code < 200) ||
(code == 204) || (code == 304)) {