mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-27 09:06:46 -04:00
BUG/MINOR: htx: Save hdrs_bytes when the HTX start-line is replaced
The HTX start-line contains the number of bytes held by all headers as seen by the mux during the parsing. So it must not be updated during analysis. It was done when the start-line is replaced, so this update was removed at this place. But we still save it from the old start-line to not loose it. It should not be used outside the mux, but there is no reason to skip it. It is a bug, however it should have no impact. This patch must be backported to 2.0.
This commit is contained in:
parent
1933801136
commit
2bce046eea
1 changed files with 2 additions and 2 deletions
|
|
@ -760,6 +760,7 @@ struct htx_sl *htx_replace_stline(struct htx *htx, struct htx_blk *blk, const st
|
|||
sl = htx_get_blk_ptr(htx, blk);
|
||||
tmp.info = sl->info;
|
||||
tmp.flags = sl->flags;
|
||||
tmp.hdrs_bytes = sl->hdrs_bytes;
|
||||
|
||||
sz = htx_get_blksz(blk);
|
||||
delta = sizeof(*sl) + p1.len + p2.len + p3.len - sz;
|
||||
|
|
@ -778,8 +779,7 @@ struct htx_sl *htx_replace_stline(struct htx *htx, struct htx_blk *blk, const st
|
|||
sl = htx_get_blk_ptr(htx, blk);
|
||||
sl->info = tmp.info;
|
||||
sl->flags = tmp.flags;
|
||||
if (sl->hdrs_bytes != -1)
|
||||
sl->hdrs_bytes += delta;
|
||||
sl->hdrs_bytes = tmp.hdrs_bytes;
|
||||
|
||||
HTX_SL_P1_LEN(sl) = p1.len;
|
||||
HTX_SL_P2_LEN(sl) = p2.len;
|
||||
|
|
|
|||
Loading…
Reference in a new issue