Skip to content

Commit 0ae7e15

Browse files
flobzedsiper
authored andcommitted
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 <[email protected]>
1 parent 239e9ce commit 0ae7e15

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/flb_http_client_http2.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@ static ssize_t http2_data_source_read_callback(nghttp2_session *session,
366366
}
367367
else {
368368
if (content_length > 0) {
369-
memcpy(buf, stream->request.body, content_length);
369+
memcpy(buf,
370+
&stream->request.body[body_offset], content_length);
370371

371372
stream->request.body_read_offset += content_length;
372373
}

0 commit comments

Comments
 (0)