]> Sergey Matveev's repositories - public-inbox.git/commitdiff
mbox: use per-message line-ending for From_ line
authorEric Wong <e@yhbt.net>
Sat, 18 Apr 2020 03:38:52 +0000 (03:38 +0000)
committerEric Wong <e@yhbt.net>
Sun, 19 Apr 2020 08:51:27 +0000 (08:51 +0000)
Email::Simple preserves the message line ending in headers, so
make the From_ line consistent with the rest of the headers.

lib/PublicInbox/Mbox.pm

index d5beceaf65e18b650e147dfef5ed213e8f1a5270..16de1a728ab6345f58c0637f537bfca6485a44ce 100644 (file)
@@ -106,7 +106,7 @@ sub msg_hdr ($$;$) {
                'List-Post', "<mailto:$ibx->{-primary_address}>",
        );
        my $crlf = $header_obj->crlf;
-       my $buf = "From mboxrd\@z Thu Jan  1 00:00:00 1970\n" .
+       my $buf = 'From mboxrd@z Thu Jan  1 00:00:00 1970' . $crlf .
                        $header_obj->as_string;
        for (my $i = 0; $i < @append; $i += 2) {
                my $k = $append[$i];