mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
fix 55993 problem forwarding imap messages with attachments r=jefft,sr=mscott a=jar
This commit is contained in:
parent
91cb27bcff
commit
dcccdef7d0
@ -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:
|
||||
|
@ -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() &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user