]> source.dussan.org Git - rspamd.git/commitdiff
Use is_json for compatibility output.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 6 Apr 2014 00:20:42 +0000 (17:20 -0700)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 6 Apr 2014 00:20:42 +0000 (17:20 -0700)
src/protocol.c
src/worker.c

index ca23fa0fd24e7a091f9b2c2eb10ecffb64e9c1bd..a6e9f8d7dca6f1b95a2723ef8e6c9df932a4c730 100644 (file)
@@ -419,11 +419,14 @@ rspamd_protocol_handle_request (struct worker_task *task,
 
        if (msg->method == HTTP_SYMBOLS) {
                task->cmd = CMD_SYMBOLS;
+               task->is_json = FALSE;
        }
        else if (msg->method == HTTP_CHECK) {
                task->cmd = CMD_CHECK;
+               task->is_json = FALSE;
        }
        else {
+               task->is_json = TRUE;
                ret = rspamd_protocol_handle_url (task, msg);
        }
 
index cb5d6a140b1082303c7afd5481b0ae81050fd991..36d441d07580ef904487c0a7dbf21d035f238afd 100644 (file)
@@ -344,7 +344,6 @@ accept_socket (gint fd, short what, void *arg)
        /* Copy some variables */
        new_task->sock = nfd;
        new_task->is_mime = ctx->is_mime;
-       new_task->is_json = ctx->is_json;
        new_task->allow_learn = ctx->allow_learn;
 
        worker->srv->stat->connections_count++;