]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: httpclient: Count metadata in size to transfer via htx_xfer_blks()
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 29 Apr 2022 11:56:12 +0000 (13:56 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 29 Apr 2022 12:12:42 +0000 (14:12 +0200)
commit6b4f1f64a8641a02be8565c324cb355ef578162c
tree678b14ac8f8fa081f14de49e8835dcdc1c8ec1e8
parent534645d6c0e853dec5919764c693052f729e07ed
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.
src/http_client.c