fix 55993 problem forwarding imap messages with attachments r=jefft,sr=mscott a=jar

This commit is contained in:
bienvenu%netscape.com 2000-10-15 20:41:36 +00:00
parent 91cb27bcff
commit dcccdef7d0
2 changed files with 14 additions and 1 deletions

View File

@ -483,9 +483,11 @@ nsMsgAttachmentHandler::SnarfMsgAttachment(nsMsgCompFields *compFields)
rv = GetMessageServiceFromURI(m_uri, &messageService);
if (NS_SUCCEEDED(rv) && messageService)
{
nsCAutoString uri(m_uri);
uri.Append("?fetchCompleteMessage=true");
nsCOMPtr<nsIStreamListener> strListener;
mFetcher->QueryInterface(NS_GET_IID(nsIStreamListener), getter_AddRefs(strListener));
rv = messageService->DisplayMessage(m_uri, strListener, nsnull, nsnull, nsnull, nsnull);
rv = messageService->DisplayMessage(uri, strListener, nsnull, nsnull, nsnull, nsnull);
}
}
done:

View File

@ -454,6 +454,17 @@ NS_IMETHODIMP nsImapService::DisplayMessage(const char* aMessageURI,
aImapServer->GetMimePartsOnDemand(&useMimePartsOnDemand);
}
nsCAutoString uriStr(aMessageURI);
PRInt32 keySeparator = uriStr.FindChar('#');
if(keySeparator != -1)
{
PRInt32 keyEndSeparator = uriStr.FindCharInSet("/?&",
keySeparator);
PRInt32 mpodFetchPos = uriStr.Find("fetchCompleteMessage=true", PR_FALSE, keyEndSeparator);
if (mpodFetchPos != -1)
useMimePartsOnDemand = PR_FALSE;
}
if (!useMimePartsOnDemand || (messageSize < (uint32) gMIMEOnDemandThreshold))
// allowedToBreakApart &&
// !GetShouldFetchAllParts() &&