]> source.dussan.org Git - rspamd.git/commitdiff
Process compatibility methods.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 5 Apr 2014 23:49:46 +0000 (16:49 -0700)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 5 Apr 2014 23:49:46 +0000 (16:49 -0700)
src/protocol.c

index 8466482124803e26edfd7b1d1a8ff0234b924bd4..ca23fa0fd24e7a091f9b2c2eb10ecffb64e9c1bd 100644 (file)
@@ -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