| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- fix detection of KOI8-R and possibly other encodings
- fix parsing Russian month names
When detecting the listing encoding, we need to not only
check whether the data can be converted using given encoding,
but also whether the result can be parsed as a valid directory listing.
Also, we only need to compare the first three characters of the
abbreviated month name, because that's how they're abbreviated
in FTP directory listings.
Finally, the Russian directory listings have swapped the "month" and "day of month" columns.
BUG=65917
Review URL: http://codereview.chromium.org/6718043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81081 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
detection of KOI8-R and possibly other encodings- fix parsing Russian month namesWhen detecting the listing encoding, we need to not onlycheck whether the data can be converted using given encoding,but also whether the result can be parsed as a valid directory listing.Also, we only need to compare the first three characters of theabbreviated month name, because that's how they're abbreviatedin FTP directory listings.Finally, the Russian directory listings have swapped the "month" and "day of month" columns.BUG=65917Review URL: http://codereview.chromium.org/6718043
TBR=phajdan.jr@chromium.org
Failures (Windows only, both Vista and XP):
FtpDirectoryListingBufferTest.Parse:
.\ftp\ftp_directory_listing_parser_unittest.cc(133): error: Value of: entry.name
Actual: L""
Expected: UTF8ToUTF16(name)
Which is: L".."
Google Test trace:
.\ftp\ftp_directory_listing_parser_unittest.cc(112): Filename: ..
.\ftp\ftp_directory_listing_parser_unittest.cc(83): Test[25]: dir-listing-ls-25
.\ftp\ftp_directory_listing_parser_unittest.cc(133): error: Value of: entry.name
Actual: L""
Expected: UTF8ToUTF16(name)
Which is: L".message"
Google Test trace:
.\ftp\ftp_directory_listing_parser_unittest.cc(112): Filename: .message
.\ftp\ftp_directory_listing_parser_unittest.cc(83): Test[25]: dir-listing-ls-25
.\ftp\ftp_directory_listing_parser_unittest.cc(133): error: Value of: entry.name
Actual: L""
Expected: UTF8ToUTF16(name)
Which is: L".."
Google Test trace:
.\ftp\ftp_directory_listing_parser_unittest.cc(112): Filename: ..
.\ftp\ftp_directory_listing_parser_unittest.cc(83): Test[26]: dir-listing-ls-26
.\ftp\ftp_directory_listing_parser_unittest.cc(133): error: Value of: entry.name
Actual: L""
Expected: UTF8ToUTF16(name)
Which is: L".message"
Google Test trace:
.\ftp\ftp_directory_listing_parser_unittest.cc(112): Filename: .message
.\ftp\ftp_directory_listing_parser_unittest.cc(83): Test[26]: dir-listing-ls-26
.\ftp\ftp_directory_listing_parser_unittest.cc(133): error: Value of: entry.name
Actual: L""
Expected: UTF8ToUTF16(name)
Which is: L".."
Google Test trace:
.\ftp\ftp_directory_listing_parser_unittest.cc(112): Filename: ..
.\ftp\ftp_directory_listing_parser_unittest.cc(83): Test[27]: dir-listing-ls-27
.\ftp\ftp_directory_listing_parser_unittest.cc(133): error: Value of: entry.name
Actual: L""
Expected: UTF8ToUTF16(name)
Which is: L".message"
Google Test trace:
.\ftp\ftp_directory_listing_parser_unittest.cc(112): Filename: .message
.\ftp\ftp_directory_listing_parser_unittest.cc(83): Test[27]: dir-listing-ls-27
FtpDirectoryListingParserLsTest.Good:
c:\b\build\slave\cr-win-rel\build\src\net/ftp/ftp_directory_listing_parser_unittest.h(47): error: Value of: entry.name
Actual: L""
Expected: UTF8ToUTF16(test_case.filename)
Which is: L"test"
Google Test trace:
.\ftp\ftp_directory_listing_parser_ls_unittest.cc(109): Test[21]: -rwxrwxr-x 1 ftp ftp 123 23 май 2011 test
c:\b\build\slave\cr-win-rel\build\src\net/ftp/ftp_directory_listing_parser_unittest.h(47): error: Value of: entry.name
Actual: L""
Expected: UTF8ToUTF16(test_case.filename)
Which is: L"dir"
Google Test trace:
.\ftp\ftp_directory_listing_parser_ls_unittest.cc(109): Test[22]: drwxrwxr-x 1 ftp ftp 4096 19 окт 2011 dir
Review URL: http://codereview.chromium.org/6802006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80590 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- fix detection of KOI8-R and possibly other encodings
- fix parsing Russian month names
When detecting the listing encoding, we need to not only
check whether the data can be converted using given encoding,
but also whether the result can be parsed as a valid directory listing.
Also, we only need to compare the first three characters of the
abbreviated month name, because that's how they're abbreviated
in FTP directory listings.
Finally, the Russian directory listings have swapped the "month" and "day of month" columns.
BUG=65917
Review URL: http://codereview.chromium.org/6718043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80587 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some servers, for example smallftpd, add an empty line
at the end of the listing. We should not fail on those.
I think this bug was introduced in 2009 by http://codereview.chromium.org/449011
Now we have more test cases, and this change shouldn't introduce
new compatibility problems.
BUG=72060
TEST=net_unittests
Review URL: http://codereview.chromium.org/6515009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75079 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=67797
TEST=net_unittests
Review URL: http://codereview.chromium.org/6096006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70435 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some FTP servers send MLSD listings with no facts, just
the file names. This is a valid RFC-3659 listing, but
is useless for web browsers.
In theory we could check whether a server advertises
MLSD support in FEAT response, or use LIST when MLSD
only returns file names, but the extra complexity
is not worth it.
All servers supporting MLSD must also support LIST,
so this should not regress compatibility.
This change also removes the "HPRC" directory listing parser.
Actually, it was just MLSD listing with no facts.
BUG=65328, 65584
TEST=net_unittests, also see the bugs
Review URL: http://codereview.chromium.org/5669001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68859 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is wrong.
Instead of using ICU's first guessed encoding immediately,
we ask it for all possible encodings, try them in order,
and use the first one that works.
For some sites this still results in a gibberish being displayed,
but at least the links are clickable so the site navigation
is possible.
BUG=61073
TEST=see bug
Review URL: http://codereview.chromium.org/4967001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66664 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now the "ls -l" parser ignores lines with empty file names
instead of failing.
BUG=60065
TEST=net_unittests
Review URL: http://codereview.chromium.org/4182002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64208 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=58963
TEST=net_unittests
Review URL: http://codereview.chromium.org/3774002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62515 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=56547
TEST=net_unittests
Review URL: http://codereview.chromium.org/3448029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61052 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=56547
TEST=net_unittests
Review URL: http://codereview.chromium.org/3448029
TBR=phajdan.jr@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60766 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=56547
TEST=net_unittests
Review URL: http://codereview.chromium.org/3448029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60765 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem was caused by a broken assumption about current_parser_.
After adding OnEndOfInput to FtpDirectoryListingParser interface,
it was possible that during processing of input we ended up
with just one parser, which returned error when OnEndOfInput was called.
In that case, we should just reset current_parser_ to NULL to avoid
a use-after-free error.
TEST=net_unittests
BUG=47528
Review URL: http://codereview.chromium.org/2846037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50930 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
provided.
Also provide an infrastructure to mock the current time in the tests.
BUG=36293
TEST=net_unittests
Review URL: http://codereview.chromium.org/1120012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42447 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
At least the format is specified... that's a good thing.
TEST=Covered by net_unittests.
BUG=25520, 29691
Review URL: http://codereview.chromium.org/479004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34268 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
- recognize permission listing with ACL indicator as valid
- add one more test for non-ASCII encoding
TEST=Covered by net_unittests.
BUG=25520
Review URL: http://codereview.chromium.org/472003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34240 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
TEST=Covered by net_unittests.
BUG=25520
Review URL: http://codereview.chromium.org/460139
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34079 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
TEST=Covered by net_unittests.
BUG=25520
Review URL: http://codereview.chromium.org/469010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34049 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
TEST=Covered by net_unittests.
BUG=25520
Review URL: http://codereview.chromium.org/465059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33978 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some highlights:
- more tests (including non-ASCII characters in different encodings)
- handling more variants of "ls" listing
- handling spaces in file names in "ls" listings
TEST=Covered by net_unittests.
BUG=25520
Review URL: http://codereview.chromium.org/449011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33688 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out we have to be a little more strict with that. Before
this change both ls and VMS listing parsers would claim that they
recognize the format. Also fallback to Mozilla code was broken
in that case.
TEST=Covered by net_unittests.
BUG=28263
Review URL: http://codereview.chromium.org/421006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32831 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
TEST=Covered by net_unittests.
BUG=25520
Review URL: http://codereview.chromium.org/374010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31376 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
listings sent by VMS MultiNet servers emulating Unix.
TEST=Covered by net_unittests.
BUG=22193, 25520
Review URL: http://codereview.chromium.org/368006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31217 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
CID=7193
BUG=none
TEST=using the additional test data, tools/valgrind/chrome_tests.sh -t net --gtest_filter="FtpDirectoryListingBufferTest.*"
Review URL: http://codereview.chromium.org/355037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31099 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This may not yet correctly handle all possible variants of VMS,
because there multiple TCP/IP network stacks available for that
system.
TEST=Covered by net_unittests.
BUG=22193, 25520
Review URL: http://codereview.chromium.org/348036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30995 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
TEST=Covered by net_unittests.
BUG=25520
Review URL: http://codereview.chromium.org/343022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30445 0039d316-1c4b-4281-b951-d872f2087c98
|
|
Added parser for "ls" listing style, and tests. This is not yet used by the browser (will do that in a following CL).
TEST=Covered by net_unittests.
BUG=25520
Review URL: http://codereview.chromium.org/244008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30354 0039d316-1c4b-4281-b951-d872f2087c98
|