Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Feb : Re: Indy FTP Response Codes for NLST

www.cryer.info
Managed Newsgroup Archive

Re: Indy FTP Response Codes for NLST

Subject:Re: Indy FTP Response Codes for NLST
Posted by:"Erik Berry" (..@techie.zzzcom)
Date:Wed, 14 Feb 2007 06:04:59

Remy Lebeau (TeamB) wrote:
> Then your server is very buggy.  226 must not be the first response
> code that is sent in reply to the NLST command.  It must send 125 or
> 150 first.  125 and 150 establish the presence of a valid data channel
> connection, and then 26 indicates the success of the transfer over
> that connection.  RFC 959 is very clear on this matter.

It returns the 226 to the specific SendCmd function call I mentioned (see
IdFTP.pas line 1692).  The server does this for an empty dir:

ftp> dir
200 PORT command successful
150 Opening ASCII mode data connection for file list
226 Transfer complete.

With a non-empty directory, it returns this:

ftp> dir
200 PORT command successful
150 Opening ASCII mode data connection for file list
drwxr-xr-x   2 username   groupname       4096 Feb 14 03:56 FooDir
226 Transfer complete.

Erik

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive