Skip to content

Commit

Permalink
aws: util: set max response buffer size for the http client (fluent#4047
Browse files Browse the repository at this point in the history
)

* flb_aws_util: set max response buffer size for the http client

Signed-off-by: Rayhan Hossain <[email protected]>
  • Loading branch information
hossain-rayhan authored and PettitWesley committed Sep 8, 2021
1 parent d5c4abe commit 9cb1c11
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/aws/flb_aws_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,12 @@ struct flb_http_client *request_do(struct flb_aws_client *aws_client,
goto error;
}

/* Increase the maximum HTTP response buffer size to fit large responses from AWS services */
ret = flb_http_buffer_size(c, FLB_MAX_AWS_RESP_BUFFER_SIZE);
if (ret != 0) {
flb_warn("[aws_http_client] failed to increase max response buffer size");
}

/* Add AWS Fluent Bit user agent */
if (aws_client->extra_user_agent == NULL) {
ret = flb_http_add_header(c, "User-Agent", 10,
Expand Down

0 comments on commit 9cb1c11

Please sign in to comment.