about summary refs log tree commit homepage
path: root/lib/PublicInbox/MsgIter.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/MsgIter.pm')
-rw-r--r--lib/PublicInbox/MsgIter.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/PublicInbox/MsgIter.pm b/lib/PublicInbox/MsgIter.pm
index 7c28d019..5ec2a4d9 100644
--- a/lib/PublicInbox/MsgIter.pm
+++ b/lib/PublicInbox/MsgIter.pm
@@ -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;