Commit 04913970 authored by jeremy@chromium.org's avatar jeremy@chromium.org

Recommit r53882 "FTP: fix navigation to systems with broken EPSV support."i"

Original revert was an attempt to diagnose a build bustage, but this wasn't the cause.

Review URL: http://codereview.chromium.org/3012028

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53931 0039d316-1c4b-4281-b951-d872f2087c98
parent 080b9223
......@@ -1187,7 +1187,22 @@ int FtpNetworkTransaction::DoDataConnect() {
}
int FtpNetworkTransaction::DoDataConnectComplete(int result) {
if (result == ERR_CONNECTION_TIMED_OUT && use_epsv_) {
// It's possible we hit a broken server, sadly. Fall back to PASV.
// TODO(phajdan.jr): remember it for future transactions with this server.
// TODO(phajdan.jr): write a test for this code path.
use_epsv_ = false;
next_state_ = STATE_CTRL_WRITE_PASV;
return OK;
}
// Only record the connection error after we've applied all our fallbacks.
// We want to capture the final error, one we're not going to recover from.
RecordDataConnectionError(result);
if (result != OK)
return Stop(result);
next_state_ = STATE_CTRL_WRITE_SIZE;
return OK;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment