aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/rspamdclient.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-27 11:56:28 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-27 11:56:28 +0000
commitd8c8fd5641a138cdf6e7dd6ee8dae39c4815cbae (patch)
tree4197ccecb08fe05bac0fac49b08a81506c9af641 /src/client/rspamdclient.c
parentff2894404eadc85f19cdff4e71ac6d96eddb839b (diff)
downloadrspamd-d8c8fd5641a138cdf6e7dd6ee8dae39c4815cbae.tar.gz
rspamd-d8c8fd5641a138cdf6e7dd6ee8dae39c4815cbae.zip
[Fix] Treat learning errors as non-fatal
Issue: #2637
Diffstat (limited to 'src/client/rspamdclient.c')
-rw-r--r--src/client/rspamdclient.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/rspamdclient.c b/src/client/rspamdclient.c
index 490e5c369..a4a1fb95e 100644
--- a/src/client/rspamdclient.c
+++ b/src/client/rspamdclient.c
@@ -124,7 +124,7 @@ rspamd_client_finish_handler (struct rspamd_http_connection *conn,
return 0;
}
else {
- if (rspamd_http_message_get_body (msg, NULL) == NULL || msg->code != 200) {
+ if (rspamd_http_message_get_body (msg, NULL) == NULL || msg->code / 100 != 2) {
err = g_error_new (RCLIENT_ERROR, msg->code, "HTTP error: %d, %.*s",
msg->code,
(gint)msg->status->len, msg->status->str);