]> source.dussan.org Git - rspamd.git/commitdiff
Fix more client issues.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 7 Oct 2015 15:15:34 +0000 (16:15 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 7 Oct 2015 15:15:34 +0000 (16:15 +0100)
src/client/rspamc.c
src/client/rspamdclient.c

index 150c780a12df0b58701ae9784cc937176e12b3de..1d9252147c4e7a54f2215e1f536f9800fc900ec2 100644 (file)
@@ -796,7 +796,7 @@ rspamc_output_headers (FILE *out, struct rspamd_http_message *msg)
 
        LL_FOREACH (msg->headers, h)
        {
-               rspamd_fprintf (out, "%v: %v\n", h->name, h->value);
+               rspamd_fprintf (out, "%T: %T\n", h->name, h->value);
        }
        rspamd_fprintf (out, "\n");
 }
@@ -1107,7 +1107,7 @@ rspamc_client_cb (struct rspamd_client_connection *conn,
 
                                if (json && msg != NULL && msg->body != NULL) {
                                        /* We can also output the resulting json */
-                                       rspamd_fprintf (out, "%v\n", msg->body);
+                                       rspamd_fprintf (out, "%V\n", msg->body);
                                }
                        }
                }
index 7aeb6ba8d4dadc329b587aa49bd3f6c6e3e58582..dfedb2cae7bd38dc5aa63a4f8629446601747217 100644 (file)
@@ -124,9 +124,9 @@ rspamd_client_finish_handler (struct rspamd_http_connection *conn,
        }
        else {
                if (msg->body == NULL || msg->body->len == 0 || msg->code != 200) {
-                       err = g_error_new (RCLIENT_ERROR, msg->code, "HTTP error: %d, %s",
+                       err = g_error_new (RCLIENT_ERROR, msg->code, "HTTP error: %d, %.*s",
                                        msg->code,
-                                       msg->status ? msg->status->str : "unknown error");
+                                       (gint)msg->status->len, msg->status->str);
                        req->cb (c, msg, c->server_name->str, NULL, req->input, req->ud, err);
                        g_error_free (err);