From 72faddaf01674db7c3a1c38bd6ff40b0260d70ba Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz Date: Fri, 11 Dec 2009 12:54:04 +0100 Subject: [PATCH] Make modest_tny_mime_part_is_msg detection content type case insensitive. --- src/modest-tny-mime-part.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/modest-tny-mime-part.c b/src/modest-tny-mime-part.c index ff6c1cd..e567b14 100644 --- a/src/modest-tny-mime-part.c +++ b/src/modest-tny-mime-part.c @@ -142,16 +142,20 @@ gboolean modest_tny_mime_part_is_msg (TnyMimePart *part) { const gchar *content_type; + gchar *down_content_type; if (!TNY_IS_MSG (part)) return FALSE; content_type = tny_mime_part_get_content_type (part); - if ((g_str_has_prefix (content_type, "message/rfc822") || - g_str_has_prefix (content_type, "multipart/") || - g_str_has_prefix (content_type, "text/"))) { + down_content_type = g_ascii_strdown (content_type, -1); + if ((g_str_has_prefix (down_content_type, "message/rfc822") || + g_str_has_prefix (down_content_type, "multipart/") || + g_str_has_prefix (down_content_type, "text/"))) { + g_free (down_content_type); return TRUE; } else { + g_free (down_content_type); return FALSE; } } -- 1.7.9.5