From 7b4a3195897f7e3b4e01ba01ef02c2fc74a9f904 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 18 Jan 2019 17:52:16 +0000 Subject: [Fix] Core: Fix processing of NDNs of certain type --- src/libmime/mime_parser.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c index 1dc3d85d8..4439d055e 100644 --- a/src/libmime/mime_parser.c +++ b/src/libmime/mime_parser.c @@ -1215,13 +1215,16 @@ rspamd_mime_parse_message (struct rspamd_task *task, FALSE); } } + else { + body_pos = 0; + + hdrs = rspamd_message_get_header_from_hash (npart->raw_headers, + task->task_pool, + "Content-Type", FALSE); + } pbegin = part->parsed_data.begin + body_pos; plen = part->parsed_data.len - body_pos; - - hdrs = rspamd_message_get_header_from_hash (npart->raw_headers, - task->task_pool, - "Content-Type", FALSE); } npart->raw_data.begin = pbegin; -- cgit v1.2.3