Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
1.4
-
None
-
None
Description
When a password is required to connect the FTP server, the implementation of method login in class FTPClient ends with:
return FTPReply.isPositiveCompletion(pass(password))
which returns false for any code >= 300.
However, some servers send a code 451 before returning the code 530 (NOT_LOGGED_IN). Ignoring this addtional answer,
leads to desynch the client with the server, hence leading to unexpected behaviors in next exchanges.
Threfore i propose to replace the above code in the end of the method with:
_replyCode = p_Client.pass(p_Password);
boolean result = FTPReply.isPositiveCompletion(_replyCode);
if (!result && _replyCode==FTPReply.ACTION_ABORTED){
try
catch (Exception e)
{ e.printStackTrace(); } }
return result;