]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/MsgIter.pm
descend into message/(rfc822|news|global) parts
[public-inbox.git] / lib / PublicInbox / MsgIter.pm
index 7c28d019abc8c7e9fae81c9db2b0196c21e81310..5ec2a4d9c7f1d3e06f76d4c4abb639ddacb00ac4 100644 (file)
@@ -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;