From 2b99cf9650d90ef852a01b082578a74d1c20065f Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 30 Apr 2014 15:35:09 -0700 Subject: Use status line in client. --- src/client/rspamdclient.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/client/rspamdclient.c') diff --git a/src/client/rspamdclient.c b/src/client/rspamdclient.c index 59dc77b76..55f1a6e37 100644 --- a/src/client/rspamdclient.c +++ b/src/client/rspamdclient.c @@ -98,7 +98,8 @@ 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 occurred: %d", msg->code); + err = g_error_new (RCLIENT_ERROR, msg->code, "HTTP error: %d, %s", + msg->code, msg->status ? msg->status->str : "unknown error"); req->cb (c, msg, c->server_name->str, NULL, req->ud, err); g_error_free (err); return -1; -- cgit v1.2.3