From f6c650ee09956ab04865b37316867cb2d1e75989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Lecaros?= Date: Thu, 20 Jun 2024 21:53:50 -0400 Subject: [PATCH] in_prometheus_remote_write: fix string in http response code 400. (#8978) Signed-off-by: lecaros --- plugins/in_prometheus_remote_write/prom_rw_prot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/in_prometheus_remote_write/prom_rw_prot.c b/plugins/in_prometheus_remote_write/prom_rw_prot.c index 1ffc23fdc44..6c146a3c37f 100644 --- a/plugins/in_prometheus_remote_write/prom_rw_prot.c +++ b/plugins/in_prometheus_remote_write/prom_rw_prot.c @@ -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, @@ -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, @@ -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) {