diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-20 15:24:22 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-20 15:24:22 +0000 |
commit | 3fb484784aa97b89c6f11fc9da035fdfcf58da13 (patch) | |
tree | f8396e62239fa0970dd8e73b71672f5a8f19d03f /net/ftp | |
parent | 2236bd1f2177a38f67c835a9a2ec6f6f3d26aeb3 (diff) | |
download | chromium_src-3fb484784aa97b89c6f11fc9da035fdfcf58da13.zip chromium_src-3fb484784aa97b89c6f11fc9da035fdfcf58da13.tar.gz chromium_src-3fb484784aa97b89c6f11fc9da035fdfcf58da13.tar.bz2 |
Remove the fallback Mozilla code for parsing FTP LIST response.
The new parser seems to be compatible enough to do that. The Mozilla code was very
helpful in the process of developing the new parser.
Also add UI encouraging users to submit bug reports when we can't parse the listings,
and an option to see the raw data sent by the server. This should allow us to fix
remaining compatibility problems with very rare listing types or variations.
When ?raw is found at the end of an FTP url and it is a directory listing, the parsing logic is bypassed and the data is displayed as-is with text/plain MIME type.
TEST=none
BUG=25520
Review URL: http://codereview.chromium.org/549053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36632 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/ftp')
-rw-r--r-- | net/ftp/ftp_server_type_histograms.h | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/net/ftp/ftp_server_type_histograms.h b/net/ftp/ftp_server_type_histograms.h index c425006..ed77b69 100644 --- a/net/ftp/ftp_server_type_histograms.h +++ b/net/ftp/ftp_server_type_histograms.h @@ -6,10 +6,7 @@ #define NET_FTP_FTP_SERVER_TYPE_HISTOGRAMS_H_ // The UpdateFtpServerTypeHistograms function collects statistics related -// to the types of FTP servers that our users are encountering. The -// information will help us decide for what servers we can safely drop support. -// The parsing code for each type of server is very complex, which poses a -// security risk. In fact, in current shape it's a disaster waiting to happen. +// to the types of FTP servers that our users are encountering. namespace net { @@ -19,19 +16,9 @@ enum FtpServerType { // connecting to isn't an FTP server), or a broken server. SERVER_UNKNOWN = 0, - // The types below are recognized by ParseFTPList code from Mozilla. If we hit - // one of these, it means that our new LIST parser failed for that server. - SERVER_MOZ_LSL = 1, // Server using /bin/ls -l and variants. - SERVER_MOZ_DLS = 2, // Server using /bin/dls. - SERVER_MOZ_EPLF = 3, // Server using EPLF format. - SERVER_MOZ_DOS = 4, // WinNT server configured for old style listing. - SERVER_MOZ_VMS = 5, // VMS (including variants). - SERVER_MOZ_CMS = 6, // IBM VM/CMS, VM/ESA, z/VM formats. - SERVER_MOZ_OS2 = 7, // OS/2 FTP Server. - SERVER_MOZ_W16 = 8, // win16 hosts: SuperTCP or NetManage Chameleon. - - // The types below are recognized by our new LIST parser. If we hit one of - // these, it means that it's working quite well. + // Types 1-8 are RESERVED (were earlier used for listings recognized by + // Mozilla's ParseFTPList code). + SERVER_LS = 9, // Server using /bin/ls -l listing style. SERVER_WINDOWS = 10, // Server using Windows listing style. SERVER_VMS = 11, // Server using VMS listing style. |