BUG/MINOR: mux-h1: Fix size evaluation of HTX messages after headers parsing

The block size of the start-line was not counted.

This patch must be backported to 2.0.
This commit is contained in:
Christopher Faulet 2019-09-03 16:16:50 +02:00
parent 84f06533e1
commit 8427d0d6f8

View File

@ -973,7 +973,7 @@ static size_t h1_eval_htx_req_size(struct h1m *h1m, union h1_sl *h1sl, struct ht
size_t sz;
/* size of the HTX start-line */
sz = sizeof(struct htx_sl) + h1sl->rq.m.len + h1sl->rq.u.len + h1sl->rq.v.len;
sz = sizeof(struct htx_blk) + sizeof(struct htx_sl) + h1sl->rq.m.len + h1sl->rq.u.len + h1sl->rq.v.len;
sz += h1_eval_htx_hdrs_size(hdrs);
return sz;
}
@ -984,7 +984,7 @@ static size_t h1_eval_htx_res_size(struct h1m *h1m, union h1_sl *h1sl, struct ht
size_t sz;
/* size of the HTX start-line */
sz = sizeof(struct htx_sl) + h1sl->st.v.len + h1sl->st.c.len + h1sl->st.r.len;
sz = sizeof(struct htx_blk) + sizeof(struct htx_sl) + h1sl->st.v.len + h1sl->st.c.len + h1sl->st.r.len;
sz += h1_eval_htx_hdrs_size(hdrs);
return sz;
}