WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
15415
parse the end of line about the FTPDIR list error!
https://bugs.webkit.org/show_bug.cgi?id=15415
Summary
parse the end of line about the FTPDIR list error!
wesleyZeng
Reported
2007-10-07 20:11:34 PDT
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: Index: FTPDirectoryDocument.cpp =================================================================== --- FTPDirectoryDocument.cpp £¨ÐÞ¶©°æ 26103£© +++ FTPDirectoryDocument.cpp £¨¹¤×÷¿½±´£© @@ -386,7 +386,6 @@ if (c == '\r') { *m_dest++ = '\n'; - foundNewLine = true; // possibly skip an LF in the case of an CRLF sequence m_skipLF = true; } else if (c == '\n') { @@ -394,6 +393,7 @@ *m_dest++ = c; else m_skipLF = false; + foundNewLine = true; } else { *m_dest++ = c; m_skipLF = false;
Attachments
fix ftpdir
(1.30 KB, patch)
2008-03-17 21:52 PDT
,
wesleyZeng
beidson
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Robert Blaut
Comment 1
2008-03-17 07:05:46 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?
wesleyZeng
Comment 2
2008-03-17 21:10:59 PDT
'\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
wesleyZeng
Comment 3
2008-03-17 21:52:51 PDT
Created
attachment 19859
[details]
fix ftpdir
Brady Eidson
Comment 4
2008-03-18 09:52:00 PDT
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)
Brady Eidson
Comment 5
2008-03-18 09:52:54 PDT
On the note of bug fixes coming in to this code, we really need to get the layout tests augmented to regression test it =/
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug