Closed
Bug 394992
Opened 18 years ago
Closed 9 years ago
0 byte downloads don't actually get created
Categories
(Core Graveyard :: Embedding: APIs, defect)
Core Graveyard
Embedding: APIs
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: Mardak, Unassigned)
References
Details
Attachments
(2 files)
|
45.49 KB,
image/png
|
Details | |
|
1.24 KB,
patch
|
Details | Diff | Splinter Review |
From bug 394615, which works around this issue in the UI..
It seems like WebBrowserPersist isn't creating an empty file for 0 byte downloads possibly because it doesn't bother setting data->mStream until it gets an OnDataAvailable.
Perhaps the if block..
if (!data->mStream) // Make the output stream
can be moved to the end of OnStartRequest?? And hopefully it'll create the file and leave it at 0 with no Write calls.
http://mxr.mozilla.org/mozilla/source/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp#830
Comment 1•18 years ago
|
||
> can be moved to the end of OnStartRequest?
Seems reasonable. Want to post a patch?
Keywords: helpwanted
| Reporter | ||
Comment 2•18 years ago
|
||
Here's a picture of it successfully creating a 0byte file.
Testcase would just be to download a 0 byte file similar to litmus testcase for bug 394615.
Assignee: nobody → edilee
Status: NEW → ASSIGNED
| Reporter | ||
Comment 3•18 years ago
|
||
Create the out stream data->mStream once at OnStart instead of checking if it should be created each time OnData.
Attachment #282958 -
Flags: superreview?(cbiesinger)
Attachment #282958 -
Flags: review?(cbiesinger)
Updated•18 years ago
|
Keywords: helpwanted
| Reporter | ||
Comment 4•18 years ago
|
||
biesi: Just making sure I assumed correctly... no need to send status changes from OnStart?
Updated•18 years ago
|
Flags: in-litmus?
Comment 5•18 years ago
|
||
I'm actually just going to use the testcase in http://litmus.mozilla.org/show_test.cgi?id=4631 for this, too, since it explicitly asks the tester to check that the file is both saved to disk _and_ correctly appears in the download manager, and so it'll cover this bug as well.
in-litmus+, for that.
Flags: in-litmus? → in-litmus+
Updated•17 years ago
|
Flags: in-testsuite?
Comment 7•17 years ago
|
||
biesi - any update on the review for this?
| Reporter | ||
Updated•15 years ago
|
Assignee: edilee → nobody
| Reporter | ||
Updated•15 years ago
|
Attachment #282958 -
Flags: superreview?(cbiesinger)
Attachment #282958 -
Flags: review?(cbiesinger)
Updated•15 years ago
|
Status: ASSIGNED → NEW
Comment 8•9 years ago
|
||
Marking a bunch of bugs in the "Embedding: APIs" component INCOMPLETE in preparation to archive that component. If I have done this incorrectly, please reopen the bugs and move them to a more correct component as we don't have "embedding" APIs any more.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INCOMPLETE
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•