diff options
author | Eric Wong <e@80x24.org> | 2017-01-10 21:40:37 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-01-10 22:02:51 +0000 |
commit | 3fc59df0d633a17e0c5e43d633d12e8772c06ec3 (patch) | |
tree | 2c4f6800777694fa8e2d40b625d2fe766f719adf /lib/PublicInbox/View.pm | |
parent | f1a38b18d9a46531e18143a7cd4c7a66fc89adbc (diff) | |
download | public-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.pm | 8 |
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; |