From: Timo Sirainen Date: Mon, 10 Oct 2016 17:24:41 +0000 (+0300) Subject: lib-imap: imap_bodystructure_parse() ignores text/plain flag mismatch for now. X-Git-Tag: 2.2.26~111 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c0c6115e007ab0efdd56ee8fa2b83d8cc007e159;p=thirdparty%2Fdovecot%2Fcore.git lib-imap: imap_bodystructure_parse() ignores text/plain flag mismatch for now. Maybe we can enable it some day far into the future, but for now this just causes unnecessary cache file rebuilds. --- diff --git a/src/lib-imap/imap-bodystructure.c b/src/lib-imap/imap-bodystructure.c index 14da214e71..a379a7548d 100644 --- a/src/lib-imap/imap-bodystructure.c +++ b/src/lib-imap/imap-bodystructure.c @@ -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;