about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-01-10 21:40:37 +0000
committerEric Wong <e@80x24.org>2017-01-10 22:02:51 +0000
commit3fc59df0d633a17e0c5e43d633d12e8772c06ec3 (patch)
tree2c4f6800777694fa8e2d40b625d2fe766f719adf /lib/PublicInbox/View.pm
parentf1a38b18d9a46531e18143a7cd4c7a66fc89adbc (diff)
downloadpublic-inbox-3fc59df0d633a17e0c5e43d633d12e8772c06ec3.tar.gz
This should fix problems with multipart messages where
text/plain parts lack a header.

cf. git clone --mirror https://github.com/rjbs/Email-MIME.git
    refs/pull/28/head

In the future, we may still introduce as streaming
interface to reduce memory usage on large emails.
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index e4e9d7d2..2c37cd42 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -299,7 +299,7 @@ sub stream_thread ($$) {
         }
         return missing_thread($ctx) unless $mime;
 
-        $mime = Email::MIME->new($mime);
+        $mime = PublicInbox::MIME->new($mime);
         $ctx->{-title_html} = ascii_html($mime->header('Subject'));
         $ctx->{-html_tip} = thread_index_entry($ctx, $level, $mime);
         PublicInbox::WwwStream->response($ctx, 200, sub {
@@ -311,7 +311,7 @@ sub stream_thread ($$) {
                         unshift @q, map { ($cl, $_) } @{$node->{children}};
                         my $mid = $node->{id};
                         if ($mime = $inbox->msg_by_smsg($node->{smsg})) {
-                                $mime = Email::MIME->new($mime);
+                                $mime = PublicInbox::MIME->new($mime);
                                 return thread_index_entry($ctx, $level, $mime);
                         } else {
                                 return ghost_index_entry($ctx, $level, $node);
@@ -362,7 +362,7 @@ sub thread_html {
                 $mime = $inbox->msg_by_smsg($mime) and last;
         }
         return missing_thread($ctx) unless $mime;
-        $mime = Email::MIME->new($mime);
+        $mime = PublicInbox::MIME->new($mime);
         $ctx->{-title_html} = ascii_html($mime->header('Subject'));
         $ctx->{-html_tip} = '<pre>'.index_entry($mime, $ctx, scalar @$msgs);
         $mime = undef;
@@ -372,7 +372,7 @@ sub thread_html {
                         $mime = $inbox->msg_by_smsg($mime) and last;
                 }
                 if ($mime) {
-                        $mime = Email::MIME->new($mime);
+                        $mime = PublicInbox::MIME->new($mime);
                         return index_entry($mime, $ctx, scalar @$msgs);
                 }
                 $msgs = undef;