]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Preserve real_charset in set_part_binary() 5984/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 13 Apr 2026 17:07:21 +0000 (20:07 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 13 Apr 2026 17:07:21 +0000 (20:07 +0300)
Early exit via set_part_binary() skipped the text_part->real_charset
assignment, leaving it NULL and causing downstream consumers to report
#cs:unk instead of #cs:x-binaryenc for binary parts.

src/libmime/mime_encoding.c

index b24d9c036e5f15b05971dc984fd9a0c46d383e19..1766ec549fd41177fa93b6d9e10cbd1fd98e0582 100644 (file)
@@ -736,6 +736,7 @@ set_part_binary(struct rspamd_task *task,
                                   charset);
        SET_PART_RAW(text_part);
        text_part->utf_raw_content = part_content;
+       text_part->real_charset = charset;
 }
 
 void rspamd_mime_text_part_maybe_convert(struct rspamd_task *task,