Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in_prometheus_remote_write: prom_rw_prot: Fix string in http response code 400 #8978

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading