From: Vsevolod Stakhov Date: Sat, 5 Apr 2014 23:49:46 +0000 (-0700) Subject: Process compatibility methods. X-Git-Tag: 0.7.0~332 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0cf7219c17141d5bc8d4040abce89b11dde8cf2;p=thirdparty%2Frspamd.git Process compatibility methods. --- diff --git a/src/protocol.c b/src/protocol.c index 8466482124..ca23fa0fd2 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -415,11 +415,23 @@ gboolean rspamd_protocol_handle_request (struct worker_task *task, struct rspamd_http_message *msg) { - if (rspamd_protocol_handle_url (task, msg)) { - return rspamd_protocol_handle_headers (task, msg); + gboolean ret = TRUE; + + if (msg->method == HTTP_SYMBOLS) { + task->cmd = CMD_SYMBOLS; + } + else if (msg->method == HTTP_CHECK) { + task->cmd = CMD_CHECK; + } + else { + ret = rspamd_protocol_handle_url (task, msg); } - return FALSE; + if (ret) { + ret = rspamd_protocol_handle_headers (task, msg); + } + + return ret; } static void