diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-12 13:48:12 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-12 13:48:12 +0000 |
commit | 6da8d8cae25d859b6f25a8bfc279189330a41a45 (patch) | |
tree | 8c4e409c86323406e8101ca97a5897edd8cd63e0 | |
parent | 1d95f1678637f30b6bf453f781b5938d64354228 (diff) | |
download | rspamd-6da8d8cae25d859b6f25a8bfc279189330a41a45.tar.gz rspamd-6da8d8cae25d859b6f25a8bfc279189330a41a45.zip |
[Minor] Process charset in content type
-rw-r--r-- | src/libmime/content_type.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 * |