aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-07 16:15:34 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-07 16:15:34 +0100
commit1f684709f66b5784ab94b8a52a76c1a4e5e30535 (patch)
tree87dcb574732f05e22ead876177162db88876fac0
parentb89e571899582307150e05736c59989c0ca81e9b (diff)
downloadrspamd-1f684709f66b5784ab94b8a52a76c1a4e5e30535.tar.gz
rspamd-1f684709f66b5784ab94b8a52a76c1a4e5e30535.zip
Fix more client issues.
-rw-r--r--src/client/rspamc.c4
-rw-r--r--src/client/rspamdclient.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/client/rspamc.c b/src/client/rspamc.c
index 150c780a1..1d9252147 100644
--- a/src/client/rspamc.c
+++ b/src/client/rspamc.c
@@ -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);
}
}
}
diff --git a/src/client/rspamdclient.c b/src/client/rspamdclient.c
index 7aeb6ba8d..dfedb2cae 100644
--- a/src/client/rspamdclient.c
+++ b/src/client/rspamdclient.c
@@ -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);