Open Bug 595646 Opened 15 years ago Updated 3 years ago

nsIHelperAppLauncher contentLength doesn't work in Mozilla Thunderbird for mailbox url's

Categories

(MailNews Core :: Backend, defect)

x86
Windows XP
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: P.Kern1, Unassigned)

Details

(Keywords: testcase)

Attachments

(5 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 nsIHelperAppLauncher contentLength doesn't work in Mozilla Thunderbird for mailbox url's. I always get 11206112 bytes. Reproducible: Always
Summary: nsIHelperAppLauncher contentLength doesn't work in Mozilla Thunderbird for mailbox url's. I always get 11206112 bytes. → nsIHelperAppLauncher contentLength doesn't work in Mozilla Thunderbird for mailbox url's
do you have a piece of code that exhibits the bug that you could share ?
Component: General → Backend
Product: Thunderbird → MailNews Core
QA Contact: general → backend
Attached image Image Number 1
Attached image Image Number 2
Attached image Image Number 3
Attached file dialog.js (obsolete) —
Attached image Image Number 4
I think dialog.mLauncher.contentLength returns the size of the attachment instead of the selected file.
Hmm... as I'm looking through the source code, I am willing to bet that the size is not the size of the attachment but the size of the message as a whole, since it picks up the content length from the message size. I don't know how the URI load process works in full, but fixing this is likely a lot of trouble (since MIME won't know part size until it starts getting the message stream, i.e., after the dialog has been clicked through [ I think ], so this information would need to be cached somewhere from the first MIME run... if there is one.
// https://developer.mozilla.org/en/Extensions/Thunderbird/HowTos/Common_Thunderbird_Use_Cases/View_Message#Get_Message_Header_by_URI.2fURL this: dialog.mLauncher.source.QueryInterface(Components.interfaces.nsIMsgMessageUrl).messageHeader.messageSize; is the same as: dialog.mLauncher.contentLength; // https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIMsgDBHdr Can you add a new attribute like messageSize to get the file size from the attachment (e.g. attachmentSize)? Would that be possible? Then i can use this: dialog.mLauncher.source.QueryInterface(Components.interfaces.nsIMsgMessageUrl).messageHeader.attachmentSize;
Attached file dialog2.js
Attachment #478666 - Attachment is obsolete: true
Keywords: testcase
iirc, gloda is now storing attachment sizes but no one else does.
what does gloda mean?
Removing myslef on all the bugs I'm cced on. Please NI me if you need something on MailNews Core bugs from me.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: