Closed Bug 222209 Opened 21 years ago Closed 21 years ago

nsReadLine.h not friendly with DOS-style text file

Categories

(Core :: Networking: File, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: danielwang, Assigned: darin.moz)

Details

(Keywords: dataloss)

Attachments

(1 file)

it appears NS_ReadLine() will always skip any line with \r\n or \n\r

This function is used by mozilla/netwerk/cookie/src/nsCookieService.cpp
nsCookieService::Read() and the bug causes it to import cookie file exported by
MSIE incorrectly.
Attached patch patchSplinter Review
Attachment #133313 - Flags: review?(timeless)
Um... The code was designed to handle \r\n line endings and was tested on such
(as well as \n\r, \r, and \n) before it was checked into the tree.  When we hit
the \r we set eolStarted; when we hit the following \n we return from the
function (since we reached end of line).  That's correct.

Your change would make us not return at the end of the line, which would be wrong...

So why does this change make things better, exactly?
sorry, you are right. The code does work. -> invalid
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Attachment #133313 - Flags: review?(timeless)
v.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: