[dovecot-cvs] dovecot/src/lib-imap imap-bodystructure.c,1.42,1.43

cras at procontrol.fi cras at procontrol.fi
Wed Aug 6 18:39:07 EEST 2003


Update of /home/cvs/dovecot/src/lib-imap
In directory danu:/tmp/cvs-serv4402/lib-imap

Modified Files:
	imap-bodystructure.c 
Log Message:
Some message/rfc822 mails were returned as text/plain



Index: imap-bodystructure.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-imap/imap-bodystructure.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- imap-bodystructure.c	6 Aug 2003 13:04:44 -0000	1.42
+++ imap-bodystructure.c	6 Aug 2003 14:39:04 -0000	1.43
@@ -380,18 +380,23 @@
 		data = t_new(struct message_part_body_data, 1);
 	}
 
-	/* "content type" "subtype" */
-	str_append(str, NVL(data->content_type, "\"text\""));
-	str_append_c(str, ' ');
-	if (data->content_subtype != NULL)
-		str_append(str, data->content_subtype);
+	if (part->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822)
+		str_append(str, "\"message\" \"rfc822\"");
 	else {
-		if (data->content_type == NULL ||
-		    strcasecmp(data->content_type, "\"text\"") == 0)
-			str_append(str, "\"plain\"");
-		else
-			str_append(str, "\"unknown\"");
+		/* "content type" "subtype" */
+		str_append(str, NVL(data->content_type, "\"text\""));
+		str_append_c(str, ' ');
+
+		if (data->content_subtype != NULL)
+			str_append(str, data->content_subtype);
+		else {
+			if (data->content_type == NULL ||
+			    strcasecmp(data->content_type, "\"text\"") == 0)
+				str_append(str, "\"plain\"");
+			else
+				str_append(str, "\"unknown\"");
 
+		}
 	}
 
 	/* ("content type param key" "value" ...) */



More information about the dovecot-cvs mailing list