diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-19 23:23:29 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-19 23:23:29 +0000 |
commit | 19441957dacf04b6e66b03beb77023924a8fd4e1 (patch) | |
tree | f671061cdb01adf34246f70bdb136d8a28df8c77 /net/ftp | |
parent | c0a9259d6a5f8bd534b01923b2d33a1ebe853f30 (diff) | |
download | chromium_src-19441957dacf04b6e66b03beb77023924a8fd4e1.zip chromium_src-19441957dacf04b6e66b03beb77023924a8fd4e1.tar.gz chromium_src-19441957dacf04b6e66b03beb77023924a8fd4e1.tar.bz2 |
Improve error reporting for FTP passive connection failures.
Allocate the -6xx block to FTP errors.
R=phajdan.jr
BUG=32945
TEST=None
Review URL: http://codereview.chromium.org/650006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39510 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/ftp')
-rw-r--r-- | net/ftp/ftp_network_transaction.cc | 4 | ||||
-rw-r--r-- | net/ftp/ftp_network_transaction_unittest.cc | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/net/ftp/ftp_network_transaction.cc b/net/ftp/ftp_network_transaction.cc index dd8d219..2bfbda0 100644 --- a/net/ftp/ftp_network_transaction.cc +++ b/net/ftp/ftp_network_transaction.cc @@ -865,9 +865,9 @@ int FtpNetworkTransaction::ProcessResponsePASV( case ERROR_CLASS_INFO_NEEDED: return Stop(ERR_INVALID_RESPONSE); case ERROR_CLASS_TRANSIENT_ERROR: - return Stop(ERR_FAILED); + return Stop(ERR_FTP_PASV_COMMAND_FAILED); case ERROR_CLASS_PERMANENT_ERROR: - return Stop(ERR_FAILED); + return Stop(ERR_FTP_PASV_COMMAND_FAILED); default: NOTREACHED(); return Stop(ERR_UNEXPECTED); diff --git a/net/ftp/ftp_network_transaction_unittest.cc b/net/ftp/ftp_network_transaction_unittest.cc index 0c3e72c..d9be57c 100644 --- a/net/ftp/ftp_network_transaction_unittest.cc +++ b/net/ftp/ftp_network_transaction_unittest.cc @@ -1010,7 +1010,7 @@ TEST_F(FtpNetworkTransactionTest, DirectoryTransactionFailPasv) { FtpSocketDataProvider::PRE_PASV, FtpSocketDataProvider::PRE_QUIT, "500 failed pasv\r\n", - ERR_FAILED); + ERR_FTP_PASV_COMMAND_FAILED); } TEST_F(FtpNetworkTransactionTest, DirectoryTransactionMalformedMdtm) { @@ -1040,7 +1040,7 @@ TEST_F(FtpNetworkTransactionTest, DirectoryTransactionFailPasv2) { FtpSocketDataProvider::PRE_PASV2, FtpSocketDataProvider::PRE_QUIT, "500 failed pasv2\r\n", - ERR_FAILED); + ERR_FTP_PASV_COMMAND_FAILED); } TEST_F(FtpNetworkTransactionTest, DirectoryTransactionFailCwd) { @@ -1140,7 +1140,7 @@ TEST_F(FtpNetworkTransactionTest, DownloadTransactionFailPasv) { FtpSocketDataProvider::PRE_PASV, FtpSocketDataProvider::PRE_QUIT, "500 failed pasv\r\n", - ERR_FAILED); + ERR_FTP_PASV_COMMAND_FAILED); } TEST_F(FtpNetworkTransactionTest, DownloadTransactionFailMdtm) { |