From 1043413b4066785b4ee0ba8c38a71c3567e89b8d Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 15 Mar 2004 08:32:08 +0000 Subject: set the mime-type field on the content the same way as 2004-03-15 Not Zed * providers/imap/camel-imap-folder.c (get_content, get_message): set the mime-type field on the content the same way as construct_from_stream does. Bug #55472. * camel-mime-message.c (camel_mime_message_dump): utility function to dump message content to stdout. (camel_mime_message_init): default mime type to message/rfc822. * camel.c (camel_init): change camel verbose debug to be an int, a bitmask of debug options. svn path=/trunk/; revision=25064 --- camel/providers/imap/camel-imap-folder.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'camel/providers/imap/camel-imap-folder.c') diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index c0f49e7194..0835534ea1 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -1745,7 +1745,9 @@ get_content (CamelImapFolder *imap_folder, const char *uid, char *part_spec; part_spec = content_info_get_part_spec (ci); - + + d(printf("get content '%s' '%s'\n", part_spec, camel_content_type_format(ci->type))); + /* There are three cases: multipart/signed, multipart, message/rfc822, and "other" */ if (camel_content_type_is (ci->type, "multipart", "signed")) { CamelMultipartSigned *body_mp; @@ -1826,8 +1828,10 @@ get_content (CamelImapFolder *imap_folder, const char *uid, return NULL; } + camel_data_wrapper_set_mime_type_field(content, camel_mime_part_get_content_type(part)); camel_medium_set_content_object (CAMEL_MEDIUM (part), content); camel_object_unref (CAMEL_OBJECT (content)); + camel_multipart_add_part (body_mp, part); camel_object_unref (CAMEL_OBJECT (part)); @@ -1869,7 +1873,9 @@ get_message (CamelImapFolder *imap_folder, const char *uid, g_free (section_text); if (!stream) return NULL; - + + d(printf("get message '%s'\n", part_spec)); + msg = camel_mime_message_new (); ret = camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg), stream); camel_object_unref (CAMEL_OBJECT (stream)); @@ -1883,7 +1889,8 @@ get_message (CamelImapFolder *imap_folder, const char *uid, camel_object_unref (CAMEL_OBJECT (msg)); return NULL; } - + + camel_data_wrapper_set_mime_type_field(content, camel_mime_part_get_content_type((CamelMimePart *)msg)); camel_medium_set_content_object (CAMEL_MEDIUM (msg), content); camel_object_unref (CAMEL_OBJECT (content)); -- cgit v1.2.3