mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
MINOR: htx: make htx_from_buf() adjust the size only on new buffers
This one is used a lot during transfers, let's avoid resetting its size when there are already data in the buffer since it implies the size is correct.
This commit is contained in:
parent
8706c81316
commit
8ae4235f94
@ -532,9 +532,10 @@ static inline struct htx *htx_from_buf(struct buffer *buf)
|
||||
if (b_is_null(buf))
|
||||
return &htx_empty;
|
||||
htx = (struct htx *)(buf->area);
|
||||
if (!b_data(buf)) {
|
||||
htx->size = buf->size - sizeof(*htx);
|
||||
if (!b_data(buf))
|
||||
htx_reset(htx);
|
||||
}
|
||||
return htx;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user