When performing a data transfer, the server can send either a 125 or 150
response to indicate the transfer is starting.  RFC 959 states in section
4.2 (FTP REPLIES) htat "The server-FTP process may send at most, one 1yz
reply per command.".  Since the server has a choice of 125 or 150, lftp
needs to accept either to indicate that the data transfer is starting.
Attached is a small patch to 3.5.13 that appears to work correctly.

-- 

Craig Ruff              NCAR                        [EMAIL PROTECTED]
303-497-1211            P.O. Box 3000
                        Boulder, CO  80307
*** ftpclass.cc.orig    2007-08-30 14:05:32.000000000 -0600
--- ftpclass.cc 2007-08-30 14:06:29.000000000 -0600
***************
*** 3672,3679 ****
  
  void Ftp::CheckResp(int act)
  {
!    if(act==150)
        conn->received_150=true;
  
     if(act==150 && (flags&PASSIVE_MODE) && conn->aborted_data_sock!=-1)
        conn->CloseAbortedDataConnection();
--- 3672,3682 ----
  
  void Ftp::CheckResp(int act)
  {
!    if(act==150 || act==125)
!    {
!       act = 150;
        conn->received_150=true;
+    }
  
     if(act==150 && (flags&PASSIVE_MODE) && conn->aborted_data_sock!=-1)
        conn->CloseAbortedDataConnection();

Reply via email to