]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
"Content-Type: text" (without '/') didn't mark the message as containing
authorTimo Sirainen <tss@iki.fi>
Wed, 6 Aug 2003 00:26:40 +0000 (03:26 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 6 Aug 2003 00:26:40 +0000 (03:26 +0300)
text, which generated broken BODYSTRUCTUREs.

--HG--
branch : HEAD

src/lib-mail/message-parser.c

index f02260dc5b948686d6eb174f3eb8bfcad227b2cd..b9d5de6a927ce304da22c9afe050536ddac0c02c 100644 (file)
@@ -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;