From: Timo Sirainen Date: Wed, 6 Aug 2003 00:26:40 +0000 (+0300) Subject: "Content-Type: text" (without '/') didn't mark the message as containing X-Git-Tag: 1.1.alpha1~4444 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=335dd3839ffdd7c397cff6c5cda0282648470e0a;p=thirdparty%2Fdovecot%2Fcore.git "Content-Type: text" (without '/') didn't mark the message as containing text, which generated broken BODYSTRUCTUREs. --HG-- branch : HEAD --- diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c index f02260dc5b..b9d5de6a92 100644 --- a/src/lib-mail/message-parser.c +++ b/src/lib-mail/message-parser.c @@ -103,7 +103,8 @@ static void parse_content_type(const unsigned char *value, size_t value_len, 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;