Closed Bug 122849 Opened 23 years ago Closed 22 years ago

nsFileInputStream::ReadSegments loses data

Categories

(Core :: Networking: File, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
mozilla1.0.1

People

(Reporter: john, Assigned: dougt)

Details

(Keywords: verifyme)

nsFileInputStream::ReadSegments() tends to drop data when the writer callback is unable to handle all the data that is passed to it. This happens because the writer callback in that case will simply return that it accepted less data than it wrote. There is an assertion there, but that is not enough. To deal with this, we must either: 1. return NS_ERROR_NOT_IMPLEMENTED Or 2. Do a while() loop on the writer until either NS_BASE_STREAM_WOULD_BLOCK occurs or the number of bytes accepted equaled the number of bytes in the buffer; and then Seek() backwards just past the last byte that was accepted so that next time we'll pick up from there.
no. by design consumers must handle all data. wontfix
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WONTFIX
jumping the gun.. cold medicine.. sorry.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Target Milestone: --- → mozilla1.0.1
wfm - this was fixed by bug 126829
Status: REOPENED → RESOLVED
Closed: 23 years ago22 years ago
Resolution: --- → WORKSFORME
reporter: Can you VERIFY if this is fixed as neeti suggested?
Keywords: qawanted, verifyme
-> whitebox.
Keywords: qawanted
QA Contact: benc → ashishbhatt
You need to log in before you can comment on or make changes to this bug.