]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-imap: imap_bodystructure_parse() ignores text/plain flag mismatch for now.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 10 Oct 2016 17:24:41 +0000 (20:24 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 19 Oct 2016 12:42:17 +0000 (15:42 +0300)
Maybe we can enable it some day far into the future, but for now this just
causes unnecessary cache file rebuilds.

src/lib-imap/imap-bodystructure.c

index 14da214e71761fb9c620b8f9994da843e0a7a1a7..a379a7548d306c46b935a30d9fa2e6581db7cc30 100644 (file)
@@ -740,10 +740,16 @@ imap_bodystructure_parse_args(const struct imap_arg *args, pool_t pool,
        text = strcasecmp(content_type, "text") == 0;
        message_rfc822 = strcasecmp(content_type, "message") == 0 &&
                strcasecmp(subtype, "rfc822") == 0;
+#if 0
+       /* Disabled for now. Earlier Dovecot versions handled broken
+          Content-Type headers by writing them as "text" "plain" to
+          BODYSTRUCTURE reply, but the message_part didn't have
+          MESSAGE_PART_FLAG_TEXT. */
        if (text != ((part->flags & MESSAGE_PART_FLAG_TEXT) != 0)) {
                *error_r = "message_part text flag doesn't match BODYSTRUCTURE";
                return -1;
        }
+#endif
        if (message_rfc822 != ((part->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822) != 0)) {
                *error_r = "message_part message/rfc822 flag doesn't match BODYSTRUCTURE";
                return -1;