diff --git a/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp b/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp index da1c6347457a..25d3cb1c9aea 100644 --- a/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp +++ b/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp @@ -57,7 +57,7 @@ nsFtpConnectionThread::nsFtpConnectionThread() { NS_INIT_REFCNT(); // bool init mConnected = mList = mRetryPass = mCachedConn = mSentStart = PR_FALSE; - mFireCallbacks = mUsePasv = mBin = mKeepRunning = mAnonymous = PR_TRUE; + mFireCallbacks = mBin = mKeepRunning = mAnonymous = PR_TRUE; mAction = GET; mState = FTP_COMMAND_CONNECT; @@ -1288,14 +1288,9 @@ nsFtpConnectionThread::R_pasv() { PRInt32 port; if (mResponseCode/100 != 2) { - // failed. increment to port. - // mState = FTP_S_PORT; - mUsePasv = PR_FALSE; return FTP_ERROR; } - mUsePasv = PR_TRUE; - char *ptr = nsnull; char *response = mResponseMsg.ToNewCString(); if (!response) return FTP_ERROR; @@ -1329,9 +1324,6 @@ nsFtpConnectionThread::R_pasv() { &h0, &h1, &h2, &h3, &p0, &p1); if (fields < 6) { - // bad format. we'll try PORT, but it's probably over. - - mUsePasv = PR_FALSE; return FTP_ERROR; } @@ -1714,12 +1706,7 @@ nsFtpConnectionThread::FindActionState(void) { // we're doing an operation that requies the data channel. // figure out what kind of data channel we want to setup, // and do it. - if (mUsePasv) - return FTP_S_PASV; - else - // until we have PORT support, we'll just fail. - // return FTP_S_PORT; - return FTP_ERROR; + return FTP_S_PASV; } // These operations use the command channel response as the diff --git a/netwerk/protocol/ftp/src/nsFtpConnectionThread.h b/netwerk/protocol/ftp/src/nsFtpConnectionThread.h index ed3dbd64fbc0..cef6fe6d3531 100644 --- a/netwerk/protocol/ftp/src/nsFtpConnectionThread.h +++ b/netwerk/protocol/ftp/src/nsFtpConnectionThread.h @@ -183,7 +183,6 @@ private: nsAutoString mUsername; // username nsAutoString mPassword; // password FTP_ACTION mAction; // the higher level action (GET/PUT) - PRBool mUsePasv; // use a passive data connection. PRBool mBin; // transfer mode (ascii or binary) PRBool mAnonymous; // try connecting anonymous (default) PRBool mRetryPass; // retrying the password