From ftpserver-dev-returnlaurawalker@example.com Sat Sep 30 00:27:27 2006
Return-Path: <ftpserver-dev-returnlaurawalker@example.com>
Delivered-To: laurawalker@example.com
Received: (qmail 96677 invoked from network); 30 Sep 2006 00:27:27 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 30 Sep 2006 00:27:27 -0000
Received: (qmail 18889 invoked by uid 500); 30 Sep 2006 00:27:26 -0000
Delivered-To: laurawalker@example.com
Received: (qmail 18869 invoked by uid 500); 30 Sep 2006 00:27:26 -0000
Mailing-List: contact laurawalker@example.com; run by ezmlm
Precedence: bulk
List-Help: <mailto:laurawalker@example.com>
List-Unsubscribe: <mailto:laurawalker@example.com>
List-Post: <mailto:laurawalker@example.com>
List-Id: <ftpserver-dev.incubator.apache.org>
Reply-To: laurawalker@example.com
Delivered-To: mailing list laurawalker@example.com
Received: (qmail 18858 invoked by uid 99); 30 Sep 2006 00:27:26 -0000
Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Sep 2006 17:27:26 -0700
X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=
Received: from [83.161.120.155] ([83.161.120.155:51763] helo=brutus.apache.org)
	by idunn.apache.osuosl.org (ecelerity 83.161.120.155 r(12930)) with ESMTP
	id 8E/71-21606-CE9BD154 for <laurawalker@example.com>; Fri, 29 Sep 2006 17:27:25 -0700
Received: from brutus (localhost [83.161.120.155])
	by brutus.apache.org (Postfix) with ESMTP id 20E207142DC
	for <laurawalker@example.com>; Fri, 29 Sep 2006 17:27:22 -0700 (PDT)
Message-ID: <9253415.1159576042131.JavaMail.root@brutus>
Date: Fri, 29 Sep 2006 17:27:22 -0700 (PDT)
From: "Clinton Foster (JIRA)" <laurawalker@example.com>
To: laurawalker@example.com
Subject: [jira] Commented: (FTPSERVER-42) Listing of non-existing files
 cause the problems
In-Reply-To: <11545129.1147862167904.JavaMail.jira@brutus>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

    [ http://issues.apache.org/jira/browse/FTPSERVER-42?page=comments#action_12438827 ] 
            
Clinton Foster commented on FTPSERVER-42:
-----------------------------------------

To state the problem in another way, if the filepath argument for either LIST or NLST is a non-existent file or directory, a 501 error is returned.  Thereafter, the conversation with the server is out of sync, and sending any command to the server causes strange results.  Here is a sample debug client session:

ftp> ls nosuch
---> EPSV
229 Entering Passive Mode (|||55501|)
---> EPRT |2|888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4|55503|
200 Command EPRT okay.
---> LIST nosuch
150 File status okay; about to open data connection.
501 Syntax error in parameters or arguments.
ftp> pwd
---> PWD
226 Closing data connection.
ftp> pwd
---> PWD
257 "/" is current directory.
ftp> ls
---> EPRT |2|888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4|55505|
257 "/" is current directory.
---> LIST
200 Command EPRT okay.


> Listing of non-existing files cause the problems
> ------------------------------------------------
>
>                 Key: FTPSERVER-42
>                 URL: http://issues.apache.org/jira/browse/FTPSERVER-42
>             Project: FtpServer
>          Issue Type: Bug
>            Reporter: Evgueni Smoliar
>         Attachments: patch1.txt, patch2.txt
>
>
> 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

        


{'source': 'Apache Software Foundation Public Mail Archives'}