Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Feb : Re: Indy FTP Response Codes for NLST
| Subject: | Re: Indy FTP Response Codes for NLST |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Wed, 14 Feb 2007 10:16:27 |
"Erik Berry" <eb@techie.ZZZcom> wrote in message
news:45d2fad0@newsgroups.borland.com...
> The server does this for an empty dir:
You are contradicting yourself. What you describe now is not what you
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.
In both situations, a valid data connection is being created, a 150
response is sent back from the server to confirm that, and then a 226
response is sent back when the transfer is finished. That is how FTP
is supposed to work. The amount of data being transferred over the
data connection is irrelevant. 0 bytes is perfectly acceptable, and
TIdFTP handles that fine. What you are showing is just the
consolidated output of the ftp.exe application on the DOS console
window. But there are two distinct socket connections running in the
background, pushing their respective data to the console window's
output.
Gambit