diff options
author | Not Zed <NotZed@Ximian.com> | 2004-03-15 16:32:08 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-03-15 16:32:08 +0800 |
commit | 1043413b4066785b4ee0ba8c38a71c3567e89b8d (patch) | |
tree | 33dd9e68cbc55b4496e719c8665f022feaaa6844 /camel/providers/imap/camel-imap-folder.c | |
parent | f2a8b1d3388127f9040b17137273a27333361235 (diff) | |
download | gsoc2013-evolution-1043413b4066785b4ee0ba8c38a71c3567e89b8d.tar gsoc2013-evolution-1043413b4066785b4ee0ba8c38a71c3567e89b8d.tar.gz gsoc2013-evolution-1043413b4066785b4ee0ba8c38a71c3567e89b8d.tar.bz2 gsoc2013-evolution-1043413b4066785b4ee0ba8c38a71c3567e89b8d.tar.lz gsoc2013-evolution-1043413b4066785b4ee0ba8c38a71c3567e89b8d.tar.xz gsoc2013-evolution-1043413b4066785b4ee0ba8c38a71c3567e89b8d.tar.zst gsoc2013-evolution-1043413b4066785b4ee0ba8c38a71c3567e89b8d.zip |
set the mime-type field on the content the same way as
2004-03-15 Not Zed <NotZed@Ximian.com>
* 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
Diffstat (limited to 'camel/providers/imap/camel-imap-folder.c')
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 13 |
1 files changed, 10 insertions, 3 deletions
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)); |