Closed Bug 409962 Opened 15 years ago Closed 15 years ago
Cannot view attached mail with Content-type "Message/Rfc822" correctly
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:126.96.36.199) Gecko/20071127 Firefox/188.8.131.52 Build Identifier: 184.108.40.206 Some mailer attaches a mail using Content-type with upper/lower case mixed like "Message/Rfc822" on multi-part message headers. When I double click such attachments in received mail, message dialog shows nothing. In chrome://messenger/content/messageWindow.ja :: delayedOnLoadMessageWindow(), "loadCustomMessage" variable becomes "false" and incorrect handler will be called. I am using a workaround on chrome://messenger/content/msgHdrViewOverlay.js :: L407. - currentAttachments.push (new createNewAttachmentInfo(contentType, url, displayName, uri, isExternalAttachment)); + currentAttachments.push (new createNewAttachmentInfo(contentType.toLowerCase(), url, displayName, uri, isExternalAttachment)); Reproducible: Always Steps to Reproduce: 1. 2. 3.
While I think the immediate problem is case sensitivity at http://lxr.mozilla.org/seamonkey/source/mailnews/base/src/nsMessengerContentHandler.cpp#85 ... it seems this patch is easier, and possibly fixes some other bug as well. The js change is only to avoid an unnecessary exception.
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Thunderbird 3
Comment on attachment 294839 [details] [diff] [review] proposed fix thx Magnus. + // to avoid some hazzle later down the road. I think you mean hassle I'm not sure I understand the part about the js exception - assigning messageUri.folder to folder shouldn't throw an exception, if checking messageUri.folder above didn't throw an exception. The actual mime lower case fix looks fine though.
Thanks for the quick review David! The exception is caught... but evidently |messageUri instanceof Components.interfaces.nsIMsgMailNewsUrl| throws - when I doubleclick an attached eml. ## ex=[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgMailNewsUrl.folder]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://messenger/content/messageWindow.js :: delayedOnLoadMessageWindow :: line 273" data: no]
David, see previous comment. Didn't realize you don't watch this component.
Checking in mail/base/content/messageWindow.js; /cvsroot/mozilla/mail/base/content/messageWindow.js,v <-- messageWindow.js new revision: 1.56; previous revision: 1.55 done Checking in mailnews/mime/src/mimeobj.cpp; /cvsroot/mozilla/mailnews/mime/src/mimeobj.cpp,v <-- mimeobj.cpp new revision: 1.33; previous revision: 1.32 done ->FIXED
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.