From 6da8d8cae25d859b6f25a8bfc279189330a41a45 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 12 Dec 2016 13:48:12 +0000 Subject: [PATCH] [Minor] Process charset in content type --- src/libmime/content_type.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libmime/content_type.c b/src/libmime/content_type.c index 9161850c9..fa9768bf4 100644 --- a/src/libmime/content_type.c +++ b/src/libmime/content_type.c @@ -50,6 +50,15 @@ rspamd_content_type_add_param (rspamd_mempool_t *pool, if (!found) { g_hash_table_insert (ct->attrs, &nparam->name, nparam); } + + srch.begin = "charset"; + srch.len = 7; + + if (rspamd_ftok_cmp (&nparam->name, &srch) == 0) { + /* Adjust charset */ + ct->charset.begin = nparam->value.begin; + ct->charset.len = nparam->value.len; + } } struct rspamd_content_type * -- 2.39.5