From 01d5a0d17d209be9ee7118497904282ca9cd99ba Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 12 Dec 2016 15:43:14 +0000 Subject: [PATCH] [Minor] Add alternate -> alternative substitution --- src/libmime/content_type.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/libmime/content_type.c b/src/libmime/content_type.c index e04f2bc158..b6469911ab 100644 --- a/src/libmime/content_type.c +++ b/src/libmime/content_type.c @@ -115,6 +115,17 @@ rspamd_content_type_parse (const gchar *in, } } } + else { + /* Common mistake done by retards */ + srch.begin = "alternate"; + srch.len = 9; + + if (rspamd_ftok_cmp (&res->subtype, &srch) == 0) { + res->flags |= RSPAMD_CONTENT_TYPE_BROKEN; + res->subtype.begin = "alternative"; + res->subtype.len = 11; + } + } } else { msg_warn_pool ("cannot parse content type: %*s", (gint)len, val.lc_data); -- 2.47.3