From: Vsevolod Stakhov Date: Tue, 13 Aug 2019 10:32:43 +0000 (+0100) Subject: [Fix] Fix headers propagation logic X-Git-Tag: 2.0~439 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b374f222fe50e1c957e9398b40de9e780f23addf;p=rspamd.git [Fix] Fix headers propagation logic --- diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c index 5d1ff1b77..b40353dca 100644 --- a/src/libmime/mime_parser.c +++ b/src/libmime/mime_parser.c @@ -1155,6 +1155,8 @@ rspamd_mime_parse_message (struct rspamd_task *task, MESSAGE_FIELD (task, raw_headers_content).begin, MESSAGE_FIELD (task, raw_headers_content).len, TRUE); + npart->raw_headers = rspamd_message_headers_ref ( + MESSAGE_FIELD (task, raw_headers)); } hdr = rspamd_message_get_header_from_hash ( @@ -1178,6 +1180,8 @@ rspamd_mime_parse_message (struct rspamd_task *task, MESSAGE_FIELD (task, raw_headers_content).begin, MESSAGE_FIELD (task, raw_headers_content).len, TRUE); + npart->raw_headers = rspamd_message_headers_ref ( + MESSAGE_FIELD (task, raw_headers)); } hdr = rspamd_message_get_header_from_hash ( @@ -1192,8 +1196,6 @@ rspamd_mime_parse_message (struct rspamd_task *task, pbegin = st->start + body_pos; plen = st->end - pbegin; - /* TODO: check if it is correct */ - npart->raw_headers = NULL; npart->headers_order = NULL; } else {