lib/PublicInbox/Import.pm | 7 +++++-- diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index c13d4834992b57eb9c5dbcc81b356d84749d2753..5ffc26ef61760de872fd6a27b87ca1d89fc72500 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -112,8 +112,11 @@ $n = read($r, my $lf, 1); defined($n) or die "read final byte of cat-blob failed: $!"; die "bad read on final byte: <$lf>" if $lf ne "\n"; my $cur = Email::MIME->new($buf); - if ($cur->header('Subject') ne $mime->header('Subject') || - norm_body($cur) ne norm_body($mime)) { + my $cur_s = $cur->header('Subject'); + $cur_s = '' unless defined $cur_s; + my $cur_m = $mime->header('Subject'); + $cur_m = '' unless defined $cur_m; + if ($cur_s ne $cur_m || norm_body($cur) ne norm_body($mime)) { return ('MISMATCH', $cur); }