mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-20 20:57:00 +00:00
BUG/MEDIUM: htx: Defrag if blocks position is changed and the payloads wrap
When a header is added or when a data block is added before another one, the blocks position may be changed (but not their payloads position). For instance, when a header is added, we move the block just before the EOH, if any. When the payloads wraps, it is pretty annoying because we loose the last inserted block. It is neither the tail nor the head. And it is not the front either. It is a design problem. Waiting for fixing this problem, we force a defragmentation in such case. Anyway, it should be pretty rare, so it's not really critical. This patch must be backported to 1.9.
This commit is contained in:
parent
63263e50ed
commit
05aab64b06
@ -183,6 +183,10 @@ int http_add_header(struct htx *htx, const struct ist n, const struct ist v)
|
||||
|
||||
blk = pblk;
|
||||
}
|
||||
|
||||
if (htx_get_blk_pos(htx, blk) != htx->front)
|
||||
htx_defrag(htx, NULL);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user