diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-13 09:38:06 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-13 10:07:22 +0000 |
commit | 14d9177ec87e420688db7a98eba6cff953eef54a (patch) | |
tree | 2653dc90c685c3da5eb72bf04d4c8952c5199d95 /src | |
parent | faabae44e7e990eaf529845b3281089bf0a135d6 (diff) | |
download | rspamd-14d9177ec87e420688db7a98eba6cff953eef54a.tar.gz rspamd-14d9177ec87e420688db7a98eba6cff953eef54a.zip |
[Minor] Add multipart flag
Diffstat (limited to 'src')
-rw-r--r-- | src/libmime/content_type.c | 7 | ||||
-rw-r--r-- | src/libmime/content_type.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/libmime/content_type.c b/src/libmime/content_type.c index 43c7c61d1..0e2a89a77 100644 --- a/src/libmime/content_type.c +++ b/src/libmime/content_type.c @@ -90,6 +90,13 @@ rspamd_content_type_parse (const gchar *in, (rspamd_mempool_destruct_t)g_hash_table_unref, res->attrs); } + srch.begin = "multipart"; + srch.len = 9; + + if (rspamd_ftok_cmp (&res->type, &srch) == 0) { + res->flags |= RSPAMD_CONTENT_TYPE_MULTIPART; + } + /* Now do some hacks to work with broken content types */ if (res->subtype.len == 0) { res->flags |= RSPAMD_CONTENT_TYPE_BROKEN; diff --git a/src/libmime/content_type.h b/src/libmime/content_type.h index 2a60f5f01..f417ab8d6 100644 --- a/src/libmime/content_type.h +++ b/src/libmime/content_type.h @@ -23,6 +23,7 @@ enum rspamd_content_type_flags { RSPAMD_CONTENT_TYPE_VALID = 0, RSPAMD_CONTENT_TYPE_BROKEN = 1 << 0, + RSPAMD_CONTENT_TYPE_MULTIPART = 1 << 1, }; struct rspamd_content_type_param { |