Fixes NB#123895, contents of rfc822 parts without content type are not shown
authorSergio Villar Senin <svillar@igalia.com>
Mon, 22 Jun 2009 14:34:02 +0000 (16:34 +0200)
committerSergio Villar Senin <svillar@igalia.com>
Mon, 22 Jun 2009 14:34:02 +0000 (16:34 +0200)
src/modest-tny-mime-part.c

index 766a1c6..ff6c1cd 100644 (file)
@@ -217,8 +217,9 @@ modest_tny_mime_part_get_headers_content_type (TnyMimePart *part)
 
        header_content_type = modest_tny_mime_part_get_header_value (part, "Content-Type");
 
 
        header_content_type = modest_tny_mime_part_get_header_value (part, "Content-Type");
 
+       /* See RFC2045 sec 5.2 */
        if (!header_content_type)
        if (!header_content_type)
-               return NULL;
+               return g_strdup ("text/plain; charset=us-ascii");
 
        header_content_type = g_strstrip (header_content_type);
 
 
        header_content_type = g_strstrip (header_content_type);