Skip to content

Commit

Permalink
in_prometheus_remote_write: fix string in http response code 400. (#8978
Browse files Browse the repository at this point in the history
)

Signed-off-by: lecaros <[email protected]>
  • Loading branch information
lecaros authored Jun 21, 2024
1 parent 88afa90 commit f6c650e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/in_prometheus_remote_write/prom_rw_prot.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static int send_response(struct flb_input_instance *in,
}
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 @@ -233,7 +233,7 @@ int prom_rw_prot_uncompress(struct mk_http_session *session,


/*
* Handle an incoming request. It perform extra checks over the request, if
* Handle an incoming request. It performs extra checks over the request, if
* everything is OK, it enqueue the incoming payload.
*/
int prom_rw_prot_handle(struct flb_prom_remote_write *ctx,
Expand Down Expand Up @@ -410,7 +410,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 (message != NULL) {
Expand Down

0 comments on commit f6c650e

Please sign in to comment.