mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-25 14:12:13 +00:00
BUG/MINOR: httpclient: Count metadata in size to transfer via htx_xfer_blks()
When HTX blocks are transfer from the HTTP client context to the request channel, via htx_xfer_blks() function, the metadata must also be counted, in addition to the data size. Otherwise, expected payload size will not be copied because the metadata of an HTX block (8 bytes) will be reserved. And if the payload size is lower than 8 bytes, nothing will be copied. Thus only a zero-copy will be able to copy the payload. This issue is 2.6-specific, no backport is needed.
This commit is contained in:
parent
534645d6c0
commit
6b4f1f64a8
@ -716,7 +716,7 @@ static void httpclient_applet_io_handler(struct appctx *appctx)
|
||||
} else {
|
||||
struct htx_ret ret;
|
||||
|
||||
ret = htx_xfer_blks(htx, hc_htx, hc_htx->data, HTX_BLK_UNUSED);
|
||||
ret = htx_xfer_blks(htx, hc_htx, htx_used_space(hc_htx), HTX_BLK_UNUSED);
|
||||
channel_add_input(req, ret.ret);
|
||||
|
||||
/* we must copy the EOM if we empty the buffer */
|
||||
|
Loading…
Reference in New Issue
Block a user