From 60b8785e5388cd1df1372ef468866912da9d3ccf Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Fri, 10 Jan 2025 09:41:45 +0100 Subject: [PATCH] http_client: fix muti part http2 request not working When the request body is quite big and it's split but only the first part is send multiple time instead of sending all parts. Signed-off-by: Florian Bezannier --- src/flb_http_client_http2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/flb_http_client_http2.c b/src/flb_http_client_http2.c index de22b62d151..c4a54c9b377 100644 --- a/src/flb_http_client_http2.c +++ b/src/flb_http_client_http2.c @@ -366,7 +366,8 @@ static ssize_t http2_data_source_read_callback(nghttp2_session *session, } else { if (content_length > 0) { - memcpy(buf, stream->request.body, content_length); + memcpy(buf, + &stream->request.body[body_offset], content_length); stream->request.body_read_offset += content_length; }