diff options
-rw-r--r-- | camel/ChangeLog | 4 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 16e87272d6..f1da9a7e48 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -2,7 +2,9 @@ * providers/imap/camel-imap-folder.c (get_content): Try to use the original boundary so luis will stop bugging me about "data - corruption". + corruption". Also preserve other params in the multipart + content-type by dumping it to a string and setting it on the mime + part. 2001-12-14 Jeffrey Stedfast <fejj@ximian.com> diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index c9b1d73673..492026dc07 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -1407,14 +1407,20 @@ get_content (CamelImapFolder *imap_folder, const char *uid, if (header_content_type_is (ci->type, "multipart", "*")) { CamelMultipart *body_mp; int speclen, num; + char *type; body_mp = camel_multipart_new (); camel_data_wrapper_set_mime_type_field ( CAMEL_DATA_WRAPPER (body_mp), ci->type); - /* FIXME: do we really need to set this? shouldn't it be set in the above call? */ + /* try and set the original boundary rather than generating a new one... */ camel_multipart_set_boundary (body_mp, header_content_type_param (ci->type, "boundary")); + /* looks kinda nasty but this is how ya gotta do it... */ + type = header_content_type_format (ci->type); + camel_mime_part_set_content_type (CAMEL_MIME_PART (body_mp), type); + g_free (type); + speclen = strlen (part_spec); child_spec = g_malloc (speclen + 15); memcpy (child_spec, part_spec, speclen); |