releases-comm-central/mailnews/news/public
Ben Campbell f5d7560958 Bug 1793313 - Fix bad end-of-message detection when saving news messages offline. r=mkmelin
The problem was that NntpClient was handling escaping the "." message
termination, but that nsNewsFolder::NotifyDownloadedLine() was scanning for
"." lines to finish messages. So the folder would screw up when a message
body contained a lone "." line.

The changes in detail:
- Adds notifyDownloadBegin()/notifyDownloadEnd() calls to nsIMsgNewsFolder.
- In NntpClient.jsm:
  - Now calls notifyDownloadBegin()/notifyDownloadEnd() to denote message
    boundaries.
  - No longer sends a "." final line to the folder.
  - Tries to call notifyDownloadEnd() with an error code if an error occurs.
- adds an status param to nsMsgDBFolder::EndNewOfflineMessage(), and a code
  path to clean up upon errors. News folder now uses this to handle rolling
  back if an error occurs, but IMAP still relies on magic (checking the size
  of the message written so far).
- nsNewsFolder::NotifyDownloadedLine() no longer looks for a lone "." to
  denote the end of a message. The relevant code was split out into
  NotifyDownloadBegin() and NotifyDownloadEnd().
- Added some comments to try and clarify the offline message writing vars in
  nsMsgDBFolder.

Differential Revision: https://phabricator.services.mozilla.com/D158486

--HG--
extra : absorb_source : 14534b426ccbe4239cb916c35c057ed46f3f6a4e
2022-10-03 08:26:21 +00:00
..
moz.build Bug 1781720 - Remove unused NNTP sub-modules in C++. r=mkmelin 2022-07-28 20:35:06 +10:00
nsIMsgNewsFolder.idl Bug 1793313 - Fix bad end-of-message detection when saving news messages offline. r=mkmelin 2022-10-03 08:26:21 +00:00
nsIMsgOfflineNewsState.idl Bug 757018 - upgrade license to MPL 2. 2012-05-30 17:48:24 +01:00
nsINNTPNewsgroupPost.idl Bug 1399756 - fix typos in mailnews/ using codespell. rs=comment-only,typo-fix 2018-03-20 11:54:29 +01:00
nsINewsDownloadDialogArgs.idl Bug 1605845 - Change all references to .xul files to .xhtml instead; rs=bustage-fix 2019-12-24 22:30:36 +13:00
nsINntpIncomingServer.idl Bug 1781720 - Remove unused NNTP sub-modules in C++. r=mkmelin 2022-07-28 20:35:06 +10:00
nsINntpService.idl Bug 1741619 - Change most URI APIs to from raw string to smart string. r=mkmelin 2021-11-19 20:23:48 +02:00
nsINntpUrl.idl Bug 1734361 - fix non-utf8 newsgroups. r=freaktechnik 2021-10-23 13:35:41 +03:00
nsMsgNewsCID.h Bug 1781720 - Remove unused NNTP sub-modules in C++. r=mkmelin 2022-07-28 20:35:06 +10:00