From fc59dc8c6f4429daf21f4251ae7f281784b54c55 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 17 Dec 2001 01:52:40 +0000 Subject: Try to use the original boundary so luis will stop bugging me about "data 2001-12-16 Jeffrey Stedfast * providers/imap/camel-imap-folder.c (get_content): Try to use the original boundary so luis will stop bugging me about "data corruption". Also preserve other params in the multipart content-type by dumping it to a string and setting it on the mime part. svn path=/trunk/; revision=15094 --- camel/providers/imap/camel-imap-folder.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (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 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); -- cgit v1.2.3