Chromium Code Reviews| Index: net/ftp/ftp_network_transaction.cc |
| diff --git a/net/ftp/ftp_network_transaction.cc b/net/ftp/ftp_network_transaction.cc |
| index 03a12916a38e6b58363dc46befb22298e996ac82..a4d0a734a0087d8a760441bb764565b921349f14 100644 |
| --- a/net/ftp/ftp_network_transaction.cc |
| +++ b/net/ftp/ftp_network_transaction.cc |
| @@ -522,6 +522,14 @@ int FtpNetworkTransaction::DoCtrlRead() { |
| } |
| int FtpNetworkTransaction::DoCtrlReadComplete(int result) { |
| + if (result == 0) { |
| + // Some servers (for example Pure-FTPd) apparently close the control |
| + // connection when anonymous login is not permitted. For more details |
| + // see http://crbug.com/25023. |
| + if (command_sent_ == COMMAND_USER && username_ == L"anonymous") |
| + response_.needs_auth = true; |
| + return Stop(ERR_EMPTY_RESPONSE); |
|
wtc
2009/10/31 15:16:48
I think ERR_EMPTY_RESPONSE is fine. We can also a
|
| + } |
| if (result < 0) |
| return Stop(result); |