From: Vsevolod Stakhov Date: Fri, 17 Jun 2016 14:03:54 +0000 (+0100) Subject: [Fix] Check copy result when sending message to mirrors X-Git-Tag: 1.3.0~302 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=39b7f7a564cd8c9c99fe785373ba943554ef6f14;p=rspamd.git [Fix] Check copy result when sending message to mirrors --- diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c index 20044cfe5..99fec6cc5 100644 --- a/src/rspamd_proxy.c +++ b/src/rspamd_proxy.c @@ -1031,6 +1031,13 @@ proxy_open_mirror_connections (struct rspamd_proxy_session *session) } msg = rspamd_http_connection_copy_msg (session->client_conn); + + if (msg == NULL) { + msg_err_session ("cannot copy message to send to a mirror %s: %s", + m->name, strerror (errno)); + continue; + } + rspamd_http_message_remove_header (msg, "Content-Length"); rspamd_http_message_remove_header (msg, "Key"); msg->method = HTTP_GET;