Summary: | parse the end of line about the FTPDIR list error! | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | wesleyZeng <weihong.zeng> | ||||
Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | NEW --- | ||||||
Severity: | Normal | CC: | beidson, webkit | ||||
Priority: | P2 | ||||||
Version: | 523.x (Safari 3) | ||||||
Hardware: | PC | ||||||
OS: | OS X 10.4 | ||||||
Attachments: |
|
Description
wesleyZeng
2007-10-07 20:11:34 PDT
(In reply to comment #0) > Split ftp list with '\n', but the variable > foundNewLine(loader/FTPDirectoryDocument.cpp:389) is setted when the current > character is '\r'. > See details about diffs: Can someone proceed with this report, please? wesleyZeng, did you see live example (URL) that the reported issue caused problems? '\n' is the end of line(EOL) on Linux , "\r\n" is EOL on Win32, and '\r' is EOL on Mac. So, if the current character is '\r' , m_skipLF is setted; if the current character is '\n', foundNewLine should be setted; e.g ftp://ftp.mozilla.org/pub Created attachment 19859 [details]
fix ftpdir
Comment on attachment 19859 [details]
fix ftpdir
This was a good find, but I think the fix is wrong for this reason:
We treat any of the sequences - /r, /r/n, and /n - as newlines. foundNewLine should be set whenever we encounter *any* of these sequences. I think moving the foundNewLine assignment isn't right, but adding the new one is (so we have it in both places)
On the note of bug fixes coming in to this code, we really need to get the layout tests augmented to regression test it =/ |