Skip to content

Commit

Permalink
out_oracle_log_analytics: fix 400 Bad Request
Browse files Browse the repository at this point in the history
Fresh the variable `tmp_sds` (which is still holding the data of header `host`) before handle the new header `x-content-sha256`.

Signed-off-by: hc <[email protected]>
  • Loading branch information
handsomecheung authored and edsiper committed Apr 10, 2024
1 parent addc38e commit 28f7349
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/out_oracle_log_analytics/oci_logan.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@ static int build_headers(struct flb_http_client *c, struct flb_oci_logan *ctx,
goto error_label;
}

tmp_sds = flb_sds_create_size(512);
if (!tmp_sds) {
flb_errno();
goto error_label;
}

flb_base64_encode((unsigned char*) tmp_sds, flb_sds_len(tmp_sds) - 1,
&tmp_len, sha256_buf, sizeof(sha256_buf));

Expand Down

0 comments on commit 28f7349

Please sign in to comment.