Skip to content

Commit 15299f0

Browse files
committed
in_splunk: preserve raw payload without auth header
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
1 parent 11fa360 commit 15299f0

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

plugins/in_splunk/splunk_prot.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,21 @@ static int process_raw_payload_pack(struct flb_splunk *ctx,
189189
}
190190
}
191191
else {
192-
if (ingested_auth_header != NULL) {
193-
if (ret == FLB_EVENT_ENCODER_SUCCESS) {
192+
if (ret == FLB_EVENT_ENCODER_SUCCESS) {
193+
if (ingested_auth_header != NULL) {
194194
ret = flb_log_event_encoder_append_body_values(
195195
encoder,
196196
FLB_LOG_EVENT_CSTRING_VALUE(ctx->store_token_key),
197197
FLB_LOG_EVENT_STRING_VALUE(ingested_auth_header,
198198
ingested_auth_header_len),
199199
FLB_LOG_EVENT_CSTRING_VALUE("log"),
200200
FLB_LOG_EVENT_STRING_VALUE(buf, size));
201-
201+
}
202+
else {
203+
ret = flb_log_event_encoder_append_body_values(
204+
encoder,
205+
FLB_LOG_EVENT_CSTRING_VALUE("log"),
206+
FLB_LOG_EVENT_STRING_VALUE(buf, size));
202207
}
203208
}
204209
}

0 commit comments

Comments
 (0)