diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-20 16:10:56 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-20 17:14:17 +0000 |
commit | 8bbf0b3b4894c5b683fc3b7f705044a481125c51 (patch) | |
tree | d08af85943cd8cef4418b729d0ae87e1ae6737b5 | |
parent | 46e2eceb95e4ecf5e9e6e6eaff0c906d197bdca9 (diff) | |
download | rspamd-8bbf0b3b4894c5b683fc3b7f705044a481125c51.tar.gz rspamd-8bbf0b3b4894c5b683fc3b7f705044a481125c51.zip |
[Feature] Use Rspamd rfc2047 decoder instead of gmime one
-rw-r--r-- | src/libmime/mime_headers.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c index 31a05c281..6fec91add 100644 --- a/src/libmime/mime_headers.c +++ b/src/libmime/mime_headers.c @@ -219,13 +219,10 @@ rspamd_mime_headers_process (struct rspamd_task *task, GHashTable *target, } new->value = tmp; - new->decoded = g_mime_utils_header_decode_text (new->value); + new->decoded = rspamd_mime_header_decode (task->task_pool, + new->value, strlen (tmp)); - if (new->decoded != NULL) { - rspamd_mempool_add_destructor (task->task_pool, - (rspamd_mempool_destruct_t)g_free, new->decoded); - } - else { + if (new->decoded == NULL) { new->decoded = ""; } |