diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-06-12 12:47:32 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-06-12 12:47:32 +0800 |
commit | 5cabf1be00f596a7497d50b3d72bce841bdaed91 (patch) | |
tree | 744ec43987399f00e40651d4811b18988ea857e6 /mail | |
parent | 4c7dc352b6ab027d545a4f1268000bb2555493b7 (diff) | |
download | gsoc2013-evolution-5cabf1be00f596a7497d50b3d72bce841bdaed91.tar gsoc2013-evolution-5cabf1be00f596a7497d50b3d72bce841bdaed91.tar.gz gsoc2013-evolution-5cabf1be00f596a7497d50b3d72bce841bdaed91.tar.bz2 gsoc2013-evolution-5cabf1be00f596a7497d50b3d72bce841bdaed91.tar.lz gsoc2013-evolution-5cabf1be00f596a7497d50b3d72bce841bdaed91.tar.xz gsoc2013-evolution-5cabf1be00f596a7497d50b3d72bce841bdaed91.tar.zst gsoc2013-evolution-5cabf1be00f596a7497d50b3d72bce841bdaed91.zip |
We only really want to use mail_identify_mime_part() if the content-type
2003-06-11 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (format_mime_part): We only really want to use
mail_identify_mime_part() if the content-type is
application/octet-stream - any other type (if it doesn't have a
handler) should just force the user to save to disk.
(handle_text_plain): Only pay attention to format=flowed if the
mime-type is text/plain (handle_text_plain is the generic text
handler, so we might be processing parts that are not really
text/plain, thus the format param may have different meaning for
those other textual types).
svn path=/trunk/; revision=21419
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 12 | ||||
-rw-r--r-- | mail/mail-format.c | 14 |
2 files changed, 21 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 788988e055..49241e0cee 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,15 @@ +2003-06-11 Jeffrey Stedfast <fejj@ximian.com> + + * mail-format.c (format_mime_part): We only really want to use + mail_identify_mime_part() if the content-type is + application/octet-stream - any other type (if it doesn't have a + handler) should just force the user to save to disk. + (handle_text_plain): Only pay attention to format=flowed if the + mime-type is text/plain (handle_text_plain is the generic text + handler, so we might be processing parts that are not really + text/plain, thus the format param may have different meaning for + those other textual types). + 2003-06-11 Larry Ewing <lewing@ximian.com> * mail-send-recv.c (free_folder_info): free the info structure as diff --git a/mail/mail-format.c b/mail/mail-format.c index 9b23d9f195..501bf09972 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -494,7 +494,7 @@ mail_lookup_handler (const char *mime_type) goto reg; } - /* If we at least got an application, use that. */ + /* If we at least got an application list, use that. */ if (handler->applications) { handler->generic = TRUE; handler->is_bonobo = FALSE; @@ -724,7 +724,8 @@ format_mime_part (CamelMimePart *part, MailDisplay *md, if (!strcmp (mime_type, "application/mac-binhex40")) { handler = NULL; - } else { + } else if (!strcmp (mime_type, "application/octet-stream")) { + /* only sniff application/octet-stream parts */ id_type = mail_identify_mime_part (part, md); if (id_type) { g_free (mime_type); @@ -1254,9 +1255,12 @@ handle_text_plain (CamelMimePart *part, const char *mime_type, /* Check for RFC 2646 flowed text. */ type = camel_mime_part_get_content_type (part); - format = header_content_type_param (type, "format"); - if (format && !strcasecmp (format, "flowed")) - flags |= CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED; + if (header_content_type_is (type, "text", "plain")) { + format = header_content_type_param (type, "format"); + + if (format && !strcasecmp (format, "flowed")) + flags |= CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED; + } html_filter = camel_mime_filter_tohtml_new (flags, rgb); filtered_stream = camel_stream_filter_new_with_stream ((CamelStream *) stream); |