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:Thu, 15 Feb 2007 03:22:59

Remy Lebeau (TeamB) wrote:
> described yesterday.  The command sequence you have shown now is
> indeed sending a 150 response before sending a 226 response.  What you
> described yesterday can only occur if that 150 were not being sent.
> Given this new information, the SendCmd() in question is guaranteed to
> receive the 150 in both situations, not the 226.  There is no possible
> way that the SendCmd() could be receiving the 226 prematurely.

I tried to provide as much information as I could given my understanding of
the FTP protocol.  I'm not surprised to learn that the information was not
as good as an Indy expert would be able to provide.  Maybe this result from
an empty directory using the ls command line FTP command instead of dir is
more helpful:

ftp> ls
200 PORT command successful
226 Transfer complete.

With a subdirectory present in the same directory it reports this:

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

The server is "ProFTPD 1.3.0rc2 Server", and it appears not to send a 150
response to ls/NLST requests in empty directories.  This may well violate
the RFC (another FTP server I use does send the 150 response in empty dirs)
and isn't worth working around.  If so, it may instead be worth a comment in
the source to assist others that try to connect to similar servers.

Erik

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive