BUG/MINOR: httpclient: consume partly the blocks when necessary
authorWilliam Lallemand <wlallemand@haproxy.org>
Wed, 9 Mar 2022 10:58:51 +0000 (11:58 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 14 Mar 2022 14:27:50 +0000 (15:27 +0100)
commit6603c3c636356df97797b50757c6da69dca4e22d
treec2278e23b7ebeb58d0c1d6e1b76b66cf4216b71d
parenta078552ece55658224f9d2bb847c526882770ef1
BUG/MINOR: httpclient: consume partly the blocks when necessary

Consume partly the blocks in the httpclient I/O handler when there is
not enough room in the destination buffer for the whole block or when
the block is not contained entirely in the channel's output.

It prevents the I/O handler to be stuck in cases when we need to modify
the buffer with a filter for exemple.

Must be backported in 2.5.

(cherry picked from commit c8f1eb99b4004444c7674d48d967ea3040a62d6e)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/http_client.c