aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamd_proxy.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-17 15:03:54 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-17 15:03:54 +0100
commit39b7f7a564cd8c9c99fe785373ba943554ef6f14 (patch)
tree65b8384cfe559caf6481a1eee8b6ccf77095f100 /src/rspamd_proxy.c
parent4bb28b80a77eaf9ae07d67092cce44a69074bdeb (diff)
downloadrspamd-39b7f7a564cd8c9c99fe785373ba943554ef6f14.tar.gz
rspamd-39b7f7a564cd8c9c99fe785373ba943554ef6f14.zip
[Fix] Check copy result when sending message to mirrors
Diffstat (limited to 'src/rspamd_proxy.c')
-rw-r--r--src/rspamd_proxy.c7
1 files changed, 7 insertions, 0 deletions
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;