aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-multipart.c
diff options
context:
space:
mode:
authorBertrand Guiheneuf <bertrand@src.gnome.org>1999-08-03 21:16:35 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-08-03 21:16:35 +0800
commit382308f44a4ab93659f9f54c8dac2c2cc381a471 (patch)
tree40d0f4d6d70f8ee6a8a01b7f9c6bf310732455d0 /camel/camel-multipart.c
parente9c6d8921cce940e590f763a881794323a9e6703 (diff)
downloadgsoc2013-evolution-382308f44a4ab93659f9f54c8dac2c2cc381a471.tar.gz
gsoc2013-evolution-382308f44a4ab93659f9f54c8dac2c2cc381a471.tar.zst
gsoc2013-evolution-382308f44a4ab93659f9f54c8dac2c2cc381a471.zip
There is a probleme here. We can not allow mime part content-type field
* camel/camel-mime-part.c (_set_content_object): There is a probleme here. We can not allow mime part content-type field and content_object mime-type to be different. I thus chosed to set mime part object content field to be freed (if necessary) and set to be a pointer to content_object mime type field. (_construct_from_stream): set content_object mime type to be the same as mime_part's one. This is necessary because we use _set_content_type. This two things are a bit hackish ansd may need to be redesigned. svn path=/trunk/; revision=1071
Diffstat (limited to 'camel/camel-multipart.c')
-rw-r--r--camel/camel-multipart.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/camel/camel-multipart.c b/camel/camel-multipart.c
index 8362259ea6..20a790465c 100644
--- a/camel/camel-multipart.c
+++ b/camel/camel-multipart.c
@@ -389,17 +389,16 @@ _read_part (CamelStream *new_part_stream, CamelStream *stream, gchar *normal_bou
CAMEL_LOG_FULL_DEBUG ("CamelMultipart:: Entering _read_part\n");
new_line = gmime_read_line_from_stream (stream);
- printf ("== new line = \"%s\"\n", new_line);
while (new_line && !end_of_part && !last_part) {
printf ("++ new line = \"%s\"\n", new_line);
end_of_part = (strcmp (new_line, normal_boundary) == 0);
last_part = (strcmp (new_line, end_boundary) == 0);
if (!end_of_part && !last_part) {
if (first_line) {
- camel_stream_write_string (new_part_stream, "\n");
first_line = FALSE;
- }
- camel_stream_write_strings (new_part_stream, "\n", new_line, NULL);
+ camel_stream_write_string (new_part_stream, new_line);
+ } else camel_stream_write_strings (new_part_stream, "\n", new_line, NULL);
+
new_line = gmime_read_line_from_stream (stream);
}
}
@@ -425,8 +424,6 @@ _construct_from_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
real_boundary_line = g_strdup_printf ("--%s", boundary);
end_boundary_line = g_strdup_printf ("--%s--", boundary);
- //new_part = g_string_new ("");
-
/* read the prefix if any */
new_part_stream = camel_stream_mem_new (CAMEL_STREAM_MEM_RW);