Closed Bug 82645 Opened 25 years ago Closed 25 years ago

Sending a web page while offline generate 2 messages in the unsent folder

Categories

(MailNews Core :: Composition, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: bugzilla, Assigned: bugzilla)

Details

(Whiteboard: [nsbeta1+])

Attachments

(2 files)

I am working offline. I create a message and attach a web page. When I sen the message (Send Later), I get an alert telling me there is a problem with the remote attachment and asking if I want to continue without it. If I say yes, two messages will be created into the unsent message! Expected result, should be only one message without attachment.
nominating nsbeta1. I think is bad that potentially we send twice the same message!
Status: NEW → ASSIGNED
Keywords: nsbeta1
marking nsbeta1+. Putting into 0.9.2 because I don't think attaching a web page will be too common, but if you can get a fix soon I'd like to consider this for 0.9.1
Priority: -- → P2
Whiteboard: [nsbeta1+]
Target Milestone: --- → mozilla0.9.2
Attached patch proposed fix, v1Splinter Review
please ignore the previous patch, it's for bug 82460.
Whiteboard: [nsbeta1+] → [nsbeta1+] Have fix
This is a simple fix: In nsMsgComposeAndSend::HackAttachments, we should not call GatherMimeAttachments ourself if we call SnarfAttachment as SnarfAttachment will call indirectly (synchronously or asynchronously) GatherMimeAttachments. This problem wasn't showing up until recently because nsIURILoader::OpenURI was not calling the onStopRequest function of the listener synchronously, even when we were offline. This is not the case anymore.
putting on 0.9.1 radar. Please just make sure that attaching things besides web pages works online and offline.
Target Milestone: mozilla0.9.2 → mozilla0.9.1
Whiteboard: [nsbeta1+] Have fix → [nsbeta1+] Have fix,need r=,sr=
r=varada
Whiteboard: [nsbeta1+] Have fix,need r=,sr= → wanted for 0.9.1 [nsbeta1+] Have fix, has r=, needs sr= and a=
is it really right to ignore m_pendingAttachment count? Not that I know the first thing about that code...
Put another way, is there a reason you're not checking that pending attachment count anymore?
Yes, needToCallGatherMimeAttachments replace the old logic that was using m_pendingAttachment. The goal is to call GatherMimeAttachments when we are done fetching remote attachment or if we don't have remote attachment. In the case we have remote attachment, we will call snarfAttachment which will call GatherMimeAttachments itself when done. In this case, I set needToCallGatherMimeAttachments to false to avoid calling GatherMimeAttachments a second time.
ok, r=bienvenu
thanks, seeking approval now...
Whiteboard: wanted for 0.9.1 [nsbeta1+] Have fix, has r=, needs sr= and a= → wanted for 0.9.1 [nsbeta1+] Have fix, needs a=
a= asa@mozilla.org for checkin to 0.9.1 (on behalf of drivers)
fixed and checked in
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Whiteboard: wanted for 0.9.1 [nsbeta1+] Have fix, needs a= → [nsbeta1+]
QA Contact: sheelar → laurel
OK using may31 commercial trunk builds: linux rh6.2, mac OS 9.0, win98
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: