diff options
author | Eric Wong <e@yhbt.net> | 2020-06-10 07:05:02 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-06-13 07:55:45 +0000 |
commit | cd389aac52936c82f3416b3ceefe21e1250b8a3e (patch) | |
tree | e68b068c3ec0d7aba3df80304fcb6cb398c1d589 /t/import.t | |
parent | f77b21173e730a3daa8f5eed6d73835a682b3f04 (diff) | |
download | public-inbox-cd389aac52936c82f3416b3ceefe21e1250b8a3e.tar.gz |
NNTP and IMAP both require CRLF conversions on the wire. They're also the only components which care about $smsg->{bytes}, so store the CRLF-adjusted value in over.sqlite3 and Xapian DBs.. This will allow us to optimize RFC822.SIZE fetch item in IMAP without triggering size mismatch errors in some clients' default configurations (e.g. Mail::IMAPClient), but not most others. It could also fix hypothetical problems with NNTP clients that report discrepancies between overview and article data.
Diffstat (limited to 't/import.t')
-rw-r--r-- | t/import.t | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -32,8 +32,9 @@ like($im->add($mime, undef, $smsg), qr/\A:[0-9]+\z/, 'added one message'); if ($v2) { like($smsg->{blob}, qr/\A[a-f0-9]{40}\z/, 'got last object_id'); - is($mime->as_string, ${$smsg->{-raw_email}}, 'string matches'); - is($smsg->{bytes}, length(${$smsg->{-raw_email}}), 'length matches'); + my $raw_email = $smsg->{-raw_email}; + is($mime->as_string, $$raw_email, 'string matches'); + is($smsg->{raw_bytes}, length($$raw_email), 'length matches'); my @cmd = ('git', "--git-dir=$git->{git_dir}", qw(hash-object --stdin)); my $in = tempfile(); print $in $mime->as_string or die "write failed: $!"; |