diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-02-18 16:55:13 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-02-18 16:55:13 +0000 |
commit | c7283f8e50304ec0e0efa13a674ebe867f51be07 (patch) | |
tree | 977f1dab5058a0b9ee2e8511a88d719f7da49058 /src/worker.c | |
parent | 6cbad30ffbc13f9ce49e8a560f5d0fb27f4557d1 (diff) | |
download | rspamd-c7283f8e50304ec0e0efa13a674ebe867f51be07.tar.gz rspamd-c7283f8e50304ec0e0efa13a674ebe867f51be07.zip |
Fix empty messages processing.
Diffstat (limited to 'src/worker.c')
-rw-r--r-- | src/worker.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/worker.c b/src/worker.c index 2433965fb..f322fcf7b 100644 --- a/src/worker.c +++ b/src/worker.c @@ -183,6 +183,9 @@ rspamd_worker_body_handler (struct rspamd_http_connection *conn, if (msg->body->len == 0) { msg_err ("got zero length body, cannot continue"); + task->last_error = "message's body is empty"; + task->error_code = RSPAMD_LENGTH_ERROR; + task->state = WRITE_REPLY; return 0; } @@ -215,7 +218,7 @@ rspamd_worker_body_handler (struct rspamd_http_connection *conn, if (task->cfg->pre_filters == NULL) { r = process_filters (task); if (r == -1) { - task->last_error = "Filter processing error"; + task->last_error = "filter processing error"; task->error_code = RSPAMD_FILTER_ERROR; task->state = WRITE_REPLY; return 0; |