rspamd_protocol_http_reply (msg, task);
break;
case CMD_PING:
- msg->body = g_string_new ("pong");
+ msg->body = g_string_new ("pong" CRLF);
+ ctype = "text/plain";
break;
case CMD_OTHER:
msg_err ("BROKEN");
ctx = task->worker->ctx;
+ if (!rspamd_protocol_handle_request (task, msg)) {
+ task->state = WRITE_REPLY;
+ return 0;
+ }
+
if (task->cmd == CMD_PING) {
task->state = WRITE_REPLY;
return 0;
return 0;
}
- if (!rspamd_protocol_handle_request (task, msg)) {
- task->state = WRITE_REPLY;
- return 0;
- }
-
if (!rspamd_task_process (task, msg, ctx->classify_pool, TRUE)) {
task->state = WRITE_REPLY;
}