Skip to content

Commit

Permalink
in_elasticsearch: Fix string in http response code 400 (fluent#8977)
Browse files Browse the repository at this point in the history
* in_elasticsearch: Fix string in http response code 400.

Signed-off-by: lecaros <[email protected]>
  • Loading branch information
lecaros authored and legendary-acp committed Oct 1, 2024
1 parent 952a465 commit 6494261
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/in_elasticsearch/in_elasticsearch_bulk_prot.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static int send_response(struct in_elasticsearch_bulk_conn *conn, int http_statu
}
else if (http_status == 400) {
flb_sds_printf(&out,
"HTTP/1.1 400 Forbidden\r\n"
"HTTP/1.1 400 Bad Request\r\n"
"Server: Fluent Bit v%s\r\n"
"Content-Length: %i\r\n\r\n%s",
FLB_VERSION_STR,
Expand Down Expand Up @@ -942,7 +942,7 @@ static int send_response_ng(struct flb_http_response *response,
flb_http_response_set_message(response, "No Content");
}
else if (http_status == 400) {
flb_http_response_set_message(response, "Forbidden");
flb_http_response_set_message(response, "Bad Request");
}

if (content_type != NULL) {
Expand Down

0 comments on commit 6494261

Please sign in to comment.