]> Sergey Matveev's repositories - public-inbox.git/commit
index: account for CRLF conversion when storing bytes
authorEric Wong <e@yhbt.net>
Wed, 10 Jun 2020 07:05:02 +0000 (07:05 +0000)
committerEric Wong <e@yhbt.net>
Sat, 13 Jun 2020 07:55:45 +0000 (07:55 +0000)
commitcd389aac52936c82f3416b3ceefe21e1250b8a3e
treee68b068c3ec0d7aba3df80304fcb6cb398c1d589
parentf77b21173e730a3daa8f5eed6d73835a682b3f04
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.
lib/PublicInbox/Import.pm
lib/PublicInbox/SearchIdx.pm
lib/PublicInbox/SearchIdxShard.pm
lib/PublicInbox/V2Writable.pm
t/import.t
t/nntpd.t
t/search.t