struct timeval tv;
rspamd_inet_addr_t *addr;
gchar *mime_type;
+ gchar *host;
gint fd;
gint cbref;
};
g_free (cbd->mime_type);
}
+ if (cbd->host) {
+ g_free (cbd->host);
+ }
+
g_slice_free1 (sizeof (struct lua_http_cbdata), cbd);
}
NULL);
rspamd_http_connection_write_message (cbd->conn, cbd->msg,
- NULL, cbd->mime_type, cbd, fd, &cbd->tv, cbd->ev_base);
+ cbd->host, cbd->mime_type, cbd, fd,
+ &cbd->tv, cbd->ev_base);
/* Message is now owned by a connection object */
cbd->msg = NULL;
msec_to_tv (timeout, &cbd->tv);
cbd->fd = -1;
+ if (msg->host) {
+ cbd->host = rspamd_fstring_cstr (msg->host);
+ }
+
if (session) {
cbd->session = session;
rspamd_session_add_event (session,