From cd389aac52936c82f3416b3ceefe21e1250b8a3e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 10 Jun 2020 07:05:02 +0000 Subject: index: account for CRLF conversion when storing bytes 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. --- t/nntpd.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 't/nntpd.t') diff --git a/t/nntpd.t b/t/nntpd.t index eee67ea6..d2f31323 100644 --- a/t/nntpd.t +++ b/t/nntpd.t @@ -73,7 +73,10 @@ EOF my $list_id = $addr; $list_id =~ s/@/./; $mime->header_set('List-Id', "<$list_id>"); - $len = length($mime->as_string); + my $str = $mime->as_string; + $str =~ s/(?add($mime); $im->done; if ($version == 1) { -- cgit v1.2.3-24-ge0c7