X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FMsgIter.pm;h=c503eb98b8c502e3ecda265007772fada888424f;hb=af0b0fb7a454470a32c452119d0392e0dedb3fe1;hp=7c28d019abc8c7e9fae81c9db2b0196c21e81310;hpb=453dee4881a9c764b09d33f3a827879f2cd3669d;p=public-inbox.git diff --git a/lib/PublicInbox/MsgIter.pm b/lib/PublicInbox/MsgIter.pm index 7c28d019..c503eb98 100644 --- a/lib/PublicInbox/MsgIter.pm +++ b/lib/PublicInbox/MsgIter.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2016-2020 all contributors +# Copyright (C) 2016-2021 all contributors # License: AGPL-3.0+ # read-only utilities for Email::MIME @@ -34,7 +34,7 @@ sub em_each_part ($$;$$) { } } } else { - $cb->([$mime, 0, 0], $cb_arg); + $cb->([$mime, 0, 1], $cb_arg); } } @@ -64,8 +64,12 @@ sub msg_part_text ($$) { # times when it should not have been: # <87llgalspt.fsf@free.fr> # <200308111450.h7BEoOu20077@mail.osdl.org> + # But also do not try this with ->{is_submsg} (message/rfc822), + # since a broken multipart/mixed inside a message/rfc822 part + # has not been seen in the wild, yet... if ($err && ($ct =~ m!\btext/\b!i || - $ct =~ m!\bmultipart/mixed\b!i)) { + (!$part->{is_submsg} && + $ct =~ m!\bmultipart/mixed\b!i) ) ) { my $cte = $part->header_raw('Content-Transfer-Encoding'); if (defined($cte) && $cte =~ /\b7bit\b/i) { $s = $part->body;