From 3e8163c79c3c8ab836abffdb97f495e6d9dca6c1 Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Wed, 31 Jan 2001 20:57:57 +0000 Subject: [PATCH] Bug #3754 and Bug #3369 --> the total message size we are using when fetching by chunks may just be an approximation. after the first fetch, we'll possibly get back a RFC822.SIZE which will have the exact size of the total message. Update the # bytes we need to download to match this new value if appropriate. sr=bienvenu --- mailnews/imap/src/nsImapProtocol.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mailnews/imap/src/nsImapProtocol.cpp b/mailnews/imap/src/nsImapProtocol.cpp index 721940ca4467..2ae1adfb33b4 100644 --- a/mailnews/imap/src/nsImapProtocol.cpp +++ b/mailnews/imap/src/nsImapProtocol.cpp @@ -2670,6 +2670,9 @@ void nsImapProtocol::FetchTryChunking(const char * messageIds, startByte, sizeToFetch, part); startByte += sizeToFetch; + PRUint32 newMsgSize = GetServerStateParser().SizeOfMostRecentMessage(); + if (newMsgSize > 0 && newMsgSize != downloadSize) + downloadSize = newMsgSize; } // Only abort the stream if this is a normal message download