зеркало из https://github.com/mozilla/pjs.git
better fix for 204874 problems with custom proprietary envelope command with imap sent folder, r/sr/a=sspitzer
This commit is contained in:
Родитель
a10abe7fb3
Коммит
315c0fe989
|
@ -2898,14 +2898,7 @@ nsImapProtocol::FetchMessage(const char * messageIds,
|
||||||
headersToDL = PR_smprintf("%s %s",dbHeaders, arbitraryHeaders.get());
|
headersToDL = PR_smprintf("%s %s",dbHeaders, arbitraryHeaders.get());
|
||||||
|
|
||||||
if (aolImapServer)
|
if (aolImapServer)
|
||||||
{
|
what = strdup(" XAOL-ENVELOPE INTERNALDATE)");
|
||||||
// we're not going to use the envelope command on Sent Items because it
|
|
||||||
// replaces sender with recipient.
|
|
||||||
if (strcmp(GetServerStateParser().GetSelectedMailboxName(), "Sent Items"))
|
|
||||||
what = strdup(" XAOL-ENVELOPE INTERNALDATE)");
|
|
||||||
else
|
|
||||||
what = strdup(" BODY.PEEK[HEADER.FIELDS (From To Subject)] INTERNALDATE)");
|
|
||||||
}
|
|
||||||
else if (gUseEnvelopeCmd)
|
else if (gUseEnvelopeCmd)
|
||||||
what = PR_smprintf(" ENVELOPE BODY.PEEK[HEADER.FIELDS (%s)])", headersToDL);
|
what = PR_smprintf(" ENVELOPE BODY.PEEK[HEADER.FIELDS (%s)])", headersToDL);
|
||||||
else
|
else
|
||||||
|
|
|
@ -1251,18 +1251,18 @@ 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
|
fDownloadingHeaders = PR_TRUE; // we only request internal date while downloading headers
|
||||||
if (!bNeedEndMessageDownload)
|
if (!bNeedEndMessageDownload)
|
||||||
BeginMessageDownload(MESSAGE_RFC822);
|
BeginMessageDownload(MESSAGE_RFC822);
|
||||||
bNeedEndMessageDownload = PR_TRUE;
|
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;
|
||||||
if (!bNeedEndMessageDownload)
|
if (!bNeedEndMessageDownload)
|
||||||
BeginMessageDownload(MESSAGE_RFC822);
|
BeginMessageDownload(MESSAGE_RFC822);
|
||||||
bNeedEndMessageDownload = PR_TRUE;
|
bNeedEndMessageDownload = PR_TRUE;
|
||||||
xaolenvelope_data();
|
xaolenvelope_data();
|
||||||
}
|
}
|
||||||
|
@ -1415,7 +1415,19 @@ void nsImapServerResponseParser::xaolenvelope_data()
|
||||||
fNextToken = GetNextToken();
|
fNextToken = GetNextToken();
|
||||||
if (ContinueParse())
|
if (ContinueParse())
|
||||||
{
|
{
|
||||||
nsCAutoString fromLine("From: ");
|
nsCAutoString fromLine;
|
||||||
|
if (!strcmp(GetSelectedMailboxName(), "Sent Items"))
|
||||||
|
{
|
||||||
|
// xaol envelope switches the From with the To, so we switch them back and
|
||||||
|
// create a fake from line From: user@aol.com
|
||||||
|
fromLine.Append("To: ");
|
||||||
|
nsCAutoString fakeFromLine(NS_LITERAL_CSTRING("From: ") + nsDependentCString(fServerConnection.GetImapUserName()) + NS_LITERAL_CSTRING("@aol.com"));
|
||||||
|
fServerConnection.HandleMessageDownLoadLine(fakeFromLine.get(), PR_FALSE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fromLine.Append("From: ");
|
||||||
|
}
|
||||||
parse_address(fromLine);
|
parse_address(fromLine);
|
||||||
fServerConnection.HandleMessageDownLoadLine(fromLine.get(), PR_FALSE);
|
fServerConnection.HandleMessageDownLoadLine(fromLine.get(), PR_FALSE);
|
||||||
if (ContinueParse())
|
if (ContinueParse())
|
||||||
|
|
|
@ -292,12 +292,9 @@ nsImapMailboxSpec::nsImapMailboxSpec()
|
||||||
|
|
||||||
nsImapMailboxSpec::~nsImapMailboxSpec()
|
nsImapMailboxSpec::~nsImapMailboxSpec()
|
||||||
{
|
{
|
||||||
if (allocatedPathName)
|
nsCRT::free(allocatedPathName);
|
||||||
nsCRT::free(allocatedPathName);
|
nsCRT::free(unicharPathName);
|
||||||
if (unicharPathName)
|
nsCRT::free(hostName);
|
||||||
nsCRT::free(unicharPathName);
|
|
||||||
if (hostName)
|
|
||||||
nsCRT::free(hostName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMPL_GETSET(nsImapMailboxSpec, Folder_UIDVALIDITY, PRInt32, folder_UIDVALIDITY);
|
NS_IMPL_GETSET(nsImapMailboxSpec, Folder_UIDVALIDITY, PRInt32, folder_UIDVALIDITY);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче