From: Vsevolod Stakhov Date: Mon, 12 Dec 2016 15:43:14 +0000 (+0000) Subject: [Minor] Add alternate -> alternative substitution X-Git-Tag: 1.5.0~614 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=01d5a0d17d209be9ee7118497904282ca9cd99ba;p=thirdparty%2Frspamd.git [Minor] Add alternate -> alternative substitution --- 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);