зеркало из https://github.com/mozilla/pjs.git
fix problems parsing certain imap headers with new hdr downloading code, r/sr=sspitzer, 19552
This commit is contained in:
Родитель
00a250bdc2
Коммит
4414bfd19c
|
@ -89,6 +89,7 @@
|
||||||
#include "nsIWindowMediator.h"
|
#include "nsIWindowMediator.h"
|
||||||
#include "nsIWindowWatcher.h"
|
#include "nsIWindowWatcher.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
|
#include "nsMimeTypes.h"
|
||||||
PRLogModuleInfo *IMAP;
|
PRLogModuleInfo *IMAP;
|
||||||
|
|
||||||
// netlib required files
|
// netlib required files
|
||||||
|
@ -3171,6 +3172,8 @@ void nsImapProtocol::HandleMessageDownLoadLine(const char *line, PRBool chunkEnd
|
||||||
|
|
||||||
if (GetServerStateParser().GetDownloadingHeaders())
|
if (GetServerStateParser().GetDownloadingHeaders())
|
||||||
{
|
{
|
||||||
|
if (!m_curHdrInfo)
|
||||||
|
BeginMessageDownLoad(GetServerStateParser().SizeOfMostRecentMessage(), MESSAGE_RFC822);
|
||||||
m_curHdrInfo->CacheLine(localMessageLine, GetServerStateParser().CurrentResponseUID());
|
m_curHdrInfo->CacheLine(localMessageLine, GetServerStateParser().CurrentResponseUID());
|
||||||
PR_Free( localMessageLine);
|
PR_Free( localMessageLine);
|
||||||
return;
|
return;
|
||||||
|
@ -3225,6 +3228,7 @@ void nsImapProtocol::NormalMessageEndDownload()
|
||||||
AdjustChunkSize();
|
AdjustChunkSize();
|
||||||
if (m_imapMailFolderSink && GetServerStateParser().GetDownloadingHeaders())
|
if (m_imapMailFolderSink && GetServerStateParser().GetDownloadingHeaders())
|
||||||
{
|
{
|
||||||
|
m_curHdrInfo->SetMsgSize(GetServerStateParser().SizeOfMostRecentMessage());
|
||||||
m_hdrDownloadCache.FinishCurrentHdr();
|
m_hdrDownloadCache.FinishCurrentHdr();
|
||||||
PRUint32 numHdrsCached;
|
PRUint32 numHdrsCached;
|
||||||
m_hdrDownloadCache.GetNumHeaders(&numHdrsCached);
|
m_hdrDownloadCache.GetNumHeaders(&numHdrsCached);
|
||||||
|
|
|
@ -1220,12 +1220,19 @@ void nsImapServerResponseParser::msg_fetch()
|
||||||
envelope_data();
|
envelope_data();
|
||||||
}
|
}
|
||||||
else if (!PL_strcasecmp(fNextToken, "INTERNALDATE"))
|
else if (!PL_strcasecmp(fNextToken, "INTERNALDATE"))
|
||||||
|
{
|
||||||
|
fDownloadingHeaders = PR_TRUE; // we only request internal date while downloading headers
|
||||||
|
if (!bNeedEndMessageDownload)
|
||||||
|
BeginMessageDownload(MESSAGE_RFC822);
|
||||||
|
bNeedEndMessageDownload = PR_TRUE;
|
||||||
internal_date();
|
internal_date();
|
||||||
|
}
|
||||||
else if (!PL_strcasecmp(fNextToken, "XAOL-ENVELOPE"))
|
else if (!PL_strcasecmp(fNextToken, "XAOL-ENVELOPE"))
|
||||||
{
|
{
|
||||||
fDownloadingHeaders = PR_TRUE;
|
fDownloadingHeaders = PR_TRUE;
|
||||||
bNeedEndMessageDownload = PR_TRUE;
|
if (!bNeedEndMessageDownload)
|
||||||
BeginMessageDownload(MESSAGE_RFC822);
|
BeginMessageDownload(MESSAGE_RFC822);
|
||||||
|
bNeedEndMessageDownload = PR_TRUE;
|
||||||
xaolenvelope_data();
|
xaolenvelope_data();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Загрузка…
Ссылка в новой задаче