diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-07-10 16:57:55 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-07-10 16:57:55 +0100 |
commit | 5494406060aeb9d6e428e61cca074065f5a10e05 (patch) | |
tree | b2e5e5a9068d34be9c7ed1d27f2602191f914e1d /src/worker.c | |
parent | 89711694a948df88cafe7574cdcb08fb6e5308fa (diff) | |
download | rspamd-5494406060aeb9d6e428e61cca074065f5a10e05.tar.gz rspamd-5494406060aeb9d6e428e61cca074065f5a10e05.zip |
Parse incoming request url.
Diffstat (limited to 'src/worker.c')
-rw-r--r-- | src/worker.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/worker.c b/src/worker.c index b935accf4..c0f30a944 100644 --- a/src/worker.c +++ b/src/worker.c @@ -108,15 +108,19 @@ rspamd_worker_body_handler (struct rspamd_http_connection *conn, ctx = task->worker->ctx; if (!rspamd_protocol_handle_request (task, msg)) { - return 0; + msg_err ("cannot handle request: %e", task->err); + task->flags |= RSPAMD_TASK_FLAG_SKIP; } - - if (task->cmd == CMD_PING) { - return 0; - } - - if (!rspamd_task_load_message (task, msg, chunk, len)) { - return 0; + else { + if (task->cmd == CMD_PING) { + task->flags |= RSPAMD_TASK_FLAG_SKIP; + } + else { + if (!rspamd_task_load_message (task, msg, chunk, len)) { + msg_err ("cannot load message: %e", task->err); + task->flags |= RSPAMD_TASK_FLAG_SKIP; + } + } } rspamd_task_process (task, RSPAMD_TASK_PROCESS_ALL); |