On Mon, Mar 12, 2012 at 02:53:33PM +0400, lexa wrote:
> ---> USER anonymous
> <--- 530 This FTP server does not allow anonymous logins.
> <--- 331 Please specify the password.
> ---> QUIT

I think the actual reason is that double response.
I have changed lftp so that it correctly reports extra server messages.
Here is the patch.

-- 
   Alexander.
diff --git a/src/ftpclass.cc b/src/ftpclass.cc
index aa0bc6e..dde498f 100644
--- a/src/ftpclass.cc
+++ b/src/ftpclass.cc
@@ -2872,8 +2872,16 @@ int  Ftp::ReceiveResp()
         continue; // The space is required to terminate multiline reply
       conn->multiline_code=0;
 
-      if(conn->sync_wait>0 && !is1XX(code))
-        conn->sync_wait--; // clear the flag to send next command
+      if(!is1XX(code)) {
+        if(conn->sync_wait>0)
+           conn->sync_wait--; // clear the flag to send next command
+        else {
+           if(code!=421) {
+              LogError(3,_("extra server response"));
+              return m;
+           }
+        }
+      }
 
       CheckResp(code);
       m=MOVED;
_______________________________________________
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp

Reply via email to