mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-18 18:19:39 -05:00
MEDIUM: applet: Disable 0-copy for buffers of different size
Just like the previous commit, we must take care to never swap buffers of different size when data are exchanged between an applet and a SC. it will be mandatory when the large buffers support on channels will be added.
This commit is contained in:
parent
36282ae348
commit
8b27dfdfb0
1 changed files with 1 additions and 1 deletions
|
|
@ -505,7 +505,7 @@ size_t appctx_htx_rcv_buf(struct appctx *appctx, struct buffer *buf, size_t coun
|
|||
|
||||
ret = appctx_htx->data;
|
||||
buf_htx = htx_from_buf(buf);
|
||||
if (htx_is_empty(buf_htx) && htx_used_space(appctx_htx) <= count) {
|
||||
if (b_size(&appctx->outbuf) == b_size(buf) && htx_is_empty(buf_htx) && htx_used_space(appctx_htx) <= count) {
|
||||
htx_to_buf(buf_htx, buf);
|
||||
htx_to_buf(appctx_htx, &appctx->outbuf);
|
||||
b_xfer(buf, &appctx->outbuf, b_data(&appctx->outbuf));
|
||||
|
|
|
|||
Loading…
Reference in a new issue