]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: httpclient: add a Content-Length when the payload is known
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 4 Jul 2025 07:05:21 +0000 (09:05 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 4 Jul 2025 13:21:50 +0000 (15:21 +0200)
commitf07f0ee21c94f269fb09b28f2ce553eb59d03118
treed8673524dc898c4bf2104d0f984e563522b22637
parent5da4da0bb62b6492c3a6fc31bd699220491bf21a
MEDIUM: httpclient: add a Content-Length when the payload is known

This introduce a change of behavior in the httpclient API. When
generating a request with a payload buffer, the size of the buffer
payload is known and does not need to be streamed in chunks.

This patch force to sends payload buffer using a Content-Length header
in the request, however the behavior does not change if a callback is
still used instead of a buffer.
src/http_client.c