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");
}
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);
}
}
}
}
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);