[ 
http://issues.apache.org/jira/browse/FTPSERVER-42?page=comments#action_12412156 
] 

Sergey Vladimirov commented on FTPSERVER-42:
--------------------------------------------

Acording to RFC959, possible return codes from LIST, NLST commands are

                  125, 150
                     226, 250
                     425, 426, 451
                  450
                  500, 501, 502, 421, 530

In case of no-such-file thre possbile return codes are... 150,250,450

150 - File status okay; about to open data connection.
250 - Requested file action okay, completed.
450 - Requested file action not taken. File unavailable (e.g., file busy).

550 code (Requested action not taken. File unavailable (e.g., file not found, 
no access).) is not possible return code for LIST commands.

I think using the "250" return code and empty return list is the most 
appropriate, as proposed by Evgeniy. Need to test with other FTP servers.

> Listing of non-existing files cause the problems
> ------------------------------------------------
>
>          Key: FTPSERVER-42
>          URL: http://issues.apache.org/jira/browse/FTPSERVER-42
>      Project: FtpServer
>         Type: Bug

>     Reporter: Evgueni Smoliar

>
> list of non-existing files cause connection problems in stead of just 
> returing empty result list
> File Not exists is not syntax error!
> org.apache.ftpserver.DirectoryLister.java
> ----
> all calls like :
>         try {
>             files = m_fileSystemView.listFiles(m_file);
>         }
>         catch(FtpException ex) {
>         }
>         if(files == null) {
>             return false;
>         }
> should be changed to :
>         try {
>             files = m_fileSystemView.listFiles(m_file);
>         }
>         catch(FtpException ex) {
>         }
>         if(files == null) {
>             return true;
>         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to