]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm: Remove dead code
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 5 Nov 2017 15:47:15 +0000 (17:47 +0200)
committerTimo Sirainen <tss@dovecot.fi>
Mon, 6 Nov 2017 23:09:00 +0000 (01:09 +0200)
ret can never be >0 at this point. If there are any unexpected JSON
elements, doveadm_http_server_json_parse_v1() returns -1.

src/doveadm/client-connection-http.c

index 3ad6c5ae7d5cec9389f4fd5ce53c8aadf1b32ebf..28ad80cca7f548fface6f0d6870d6936cc0c565f 100644 (file)
@@ -730,15 +730,6 @@ doveadm_http_server_read_request_v1(struct client_request_http *req)
 
        doveadm_cmd_params_clean(&req->pargv);
 
-       if (ret > 0 && req->parse_state != CLIENT_REQUEST_PARSE_DONE) {
-               /* this may happen if the parser above runs into
-                  unexpected element, but JSON is OK */
-               http_server_request_fail_text(http_sreq,
-                       400, "Bad Request",
-                       "Unexpected JSON element in input");
-               return;
-       }
-
        if (req->input->stream_errno != 0) {
                http_server_request_fail_close(http_sreq,
                        400, "Client disconnected");