]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Allow empty body in the controller
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 26 Jul 2020 11:08:29 +0000 (12:08 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 26 Jul 2020 19:04:00 +0000 (20:04 +0100)
src/controller.c

index fb1d15efcba4ad70cbdf86e83733ba6e1390127a..0b5e423818f0311b50d1642e30eef88355accd14 100644 (file)
@@ -2090,14 +2090,6 @@ rspamd_controller_handle_scan (struct rspamd_http_connection_entry *conn_ent,
                return 0;
        }
 
-       if (rspamd_http_message_get_body (msg, NULL) == NULL) {
-               msg_err_session ("got zero length body, cannot continue");
-               rspamd_controller_send_error (conn_ent,
-                       400,
-                       "Empty body is not permitted");
-               return 0;
-       }
-
        task = rspamd_task_new (session->ctx->worker, session->cfg, session->pool,
                        ctx->lang_det, ctx->event_loop, FALSE);