BUG/MEDIUM: http-client: Ask for more room when request data cannot be xferred
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 8 Jul 2025 06:17:49 +0000 (08:17 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Oct 2025 13:42:23 +0000 (15:42 +0200)
commit1bd8f526a5a1319c16d09145def57b074e84c7dd
treec3823d3d1bd566ed498fdcdf3682e2d9222b7575
parent55b5cad454d66f09833a30f2531d8bb9e175dc48
BUG/MEDIUM: http-client: Ask for more room when request data cannot be xferred

When the request payload cannot be xferred to the channel because its buffer
is full, we must request for more room by calling sc_need_room(). It is
important to be sure the httpclient applet will not be woken up in loop to
push more data while it is not possible.

It is only an issue with large POSTs, when the payload is streamed.

This patch must be backported as far as 2.6. Note that on 2.6,
sc_need_room() only takes one argument.

(cherry picked from commit e4a0d40c62594b4504fd7443158731fef54e040a)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
(cherry picked from commit 5377ea587fba88b56e5249008be153cb529f066b)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit e1aa83ce71f826ed446b763a16e19114f4e15e83)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/http_client.c