mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 06:11:32 +02:00
BUG/MINOR: htx: Fix block size calculation when a start-line is added/replaced
What we store in the buffer is a union htx_sl, not an h1_sl, so the computed size was not correct.
This commit is contained in:
parent
ed26fb8ac8
commit
53ad16a0ef
@ -617,7 +617,7 @@ struct htx_blk *htx_replace_reqline(struct htx *htx, struct htx_blk *blk,
|
|||||||
if (type != HTX_BLK_REQ_SL)
|
if (type != HTX_BLK_REQ_SL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
size = sizeof(sl) + sl.rq.m.len + sl.rq.u.len + sl.rq.v.len;
|
size = sizeof(union htx_sl) + sl.rq.m.len + sl.rq.u.len + sl.rq.v.len;
|
||||||
blk = htx_new_blk_value(htx, blk, size);
|
blk = htx_new_blk_value(htx, blk, size);
|
||||||
if (!blk)
|
if (!blk)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -640,7 +640,7 @@ struct htx_blk *htx_replace_resline(struct htx *htx, struct htx_blk *blk,
|
|||||||
if (type != HTX_BLK_RES_SL)
|
if (type != HTX_BLK_RES_SL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
size = sizeof(sl) + sl.rq.m.len + sl.rq.u.len + sl.rq.v.len;
|
size = sizeof(union htx_sl) + sl.rq.m.len + sl.rq.u.len + sl.rq.v.len;
|
||||||
blk = htx_new_blk_value(htx, blk, size);
|
blk = htx_new_blk_value(htx, blk, size);
|
||||||
if (!blk)
|
if (!blk)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -659,7 +659,7 @@ struct htx_blk *htx_add_reqline(struct htx *htx, const union h1_sl sl)
|
|||||||
struct htx_blk *blk;
|
struct htx_blk *blk;
|
||||||
uint32_t size;
|
uint32_t size;
|
||||||
|
|
||||||
size = sizeof(sl) + sl.rq.m.len + sl.rq.u.len + sl.rq.v.len;
|
size = sizeof(union htx_sl) + sl.rq.m.len + sl.rq.u.len + sl.rq.v.len;
|
||||||
|
|
||||||
/* FIXME: check size (< 256MB) */
|
/* FIXME: check size (< 256MB) */
|
||||||
blk = htx_add_blk(htx, HTX_BLK_REQ_SL, size);
|
blk = htx_add_blk(htx, HTX_BLK_REQ_SL, size);
|
||||||
@ -679,7 +679,7 @@ struct htx_blk *htx_add_resline(struct htx *htx, const union h1_sl sl)
|
|||||||
struct htx_blk *blk;
|
struct htx_blk *blk;
|
||||||
uint32_t size;
|
uint32_t size;
|
||||||
|
|
||||||
size = sizeof(sl) + sl.st.v.len + sl.st.c.len + sl.st.r.len;
|
size = sizeof(union htx_sl) + sl.st.v.len + sl.st.c.len + sl.st.r.len;
|
||||||
|
|
||||||
/* FIXME: check size (< 256MB) */
|
/* FIXME: check size (< 256MB) */
|
||||||
blk = htx_add_blk(htx, HTX_BLK_RES_SL, size);
|
blk = htx_add_blk(htx, HTX_BLK_RES_SL, size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user