From 8fa082d4c58e77b300e459ea09d73fe0db97ead6 Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Wed, 13 Nov 2019 13:36:03 +0100 Subject: #915 Return HTTP 400 error code in og_client_state_process_payload_rest This patch meets RFC 7235 and returns an HTTP 400 error code when ogAdmServer recieves a wrong request. --- sources/ogAdmServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp index 2a66385..683aab6 100644 --- a/sources/ogAdmServer.cpp +++ b/sources/ogAdmServer.cpp @@ -4961,7 +4961,7 @@ static int og_client_state_process_payload_rest(struct og_client *cli) json_decref(root); if (err < 0) - return err; + return og_client_bad_request(cli); err = og_client_ok(cli, buf_reply); if (err < 0) { -- cgit v1.2.3-18-g5258