[dovecot-cvs] dovecot/src/lib-mail message-parser.c,1.44,1.45

cras at procontrol.fi cras at procontrol.fi
Wed Aug 6 04:26:42 EEST 2003


Update of /home/cvs/dovecot/src/lib-mail
In directory danu:/tmp/cvs-serv30856

Modified Files:
	message-parser.c 
Log Message:
"Content-Type: text" (without '/') didn't mark the message as containing
text, which generated broken BODYSTRUCTUREs.



Index: message-parser.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-mail/message-parser.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- message-parser.c	13 Jul 2003 01:08:10 -0000	1.44
+++ message-parser.c	6 Aug 2003 00:26:40 -0000	1.45
@@ -103,7 +103,8 @@
 
 	if (strcasecmp(str, "message/rfc822") == 0)
 		parser_ctx->part->flags |= MESSAGE_PART_FLAG_MESSAGE_RFC822;
-	else if (strncasecmp(str, "text/", 5) == 0)
+	else if (strncasecmp(str, "text", 4) == 0 &&
+		 (str[4] == '/' || str[4] == '\0'))
 		parser_ctx->part->flags |= MESSAGE_PART_FLAG_TEXT;
 	else if (strncasecmp(str, "multipart/", 10) == 0) {
 		parser_ctx->part->flags |= MESSAGE_PART_FLAG_MULTIPART;



More information about the dovecot-cvs mailing list