Skip to content

Commit

Permalink
in_http: fix logical error caused by merge.
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Whelan <[email protected]>
  • Loading branch information
pwhelan committed Jun 11, 2024
1 parent ed14848 commit c925f11
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions plugins/in_http/http_prot.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,24 +757,12 @@ static int process_payload(struct flb_http *ctx, struct http_conn *conn,
else if (type == HTTP_CONTENT_URLENCODED) {
ret = parse_payload_urlencoded(ctx, tag, request->data.data, request->data.len);
}

if (ret != 0) {
send_response(conn, 400, "error: invalid payload\n");
return -1;
}
else if (type == HTTP_CONTENT_MSGPACK) {
ret = parse_payload_msgpack(ctx, tag, request->data.data, request->data.len);
if (ret != 0) {
send_response(conn, 400, "error: invalid msgpack payload\n");
return -1;
}
}
else if (type == HTTP_CONTENT_MSGPACK) {
ret = parse_payload_msgpack(ctx, tag, request->data.data, request->data.len);
if (ret != 0) {
send_response(conn, 400, "error: invalid msgpack payload\n");
return -1;
}
if (ret != 0) {
send_response(conn, 400, "error: invalid payload\n");
return -1;
}

return 0;
Expand Down

0 comments on commit c925f11

Please sign in to comment.