]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add alternate -> alternative substitution
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 12 Dec 2016 15:43:14 +0000 (15:43 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 12 Dec 2016 15:43:35 +0000 (15:43 +0000)
src/libmime/content_type.c

index e04f2bc158d584b81e492a540836f711edddb2c3..b6469911ab5ef21c27d18987fe774b81355f0329 100644 (file)
@@ -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);