Re: IdFTPServer Automatically Quits After Successful Connection Due To Warning

Giganews Newsgroups
Subject: Re: IdFTPServer Automatically Quits After Successful Connection Due To Warning
Posted by:  Remy Lebeau (Indy Team) (no.spam@no.spam.com)
Date: Thu, 9 Nov 2006

"Jim Hallers" <jimdot-hallers@gmail-dot-com> wrote in message
news:1150CD35D40EE340jimdot-hallers@gmail-dot-com...

> I am needing to connect to an FTP server that acknowledges the initial
> connection with a 130 Warning message rather than a 230 success type
> message.

You cannot do that.

> While I am connected successfully, the IdFTPServer component issues
> a QUIT because it did not receive a 230 response.

TIdFTPServer does not do that.

TIdFTP, on the other hand, may.  Are you using Indy 10?  TIdFTP in Indy 9
does not send the QUIT command when the greeting is not 220.  TIdFTP in Indy
10 does.

> Is there a way to override or control this behavior

No.  It is hard-coded.  Which it should be anyway, because 220 is the only
condition that indicates that the server is ready for input.  If the server
does not send 220, then it cannot handle any input at that time.  So there
is no point in staying connected anyway.  Let it disconnect, and then
reconnect at a later time.

> so that I can successfully use the component to connect to this server?

If the server does not send 220, then it cannot be used to begin with.

> While I can trap the EIdReplyRFCError during the connect, this does not
> stop the component from automatically issuing a QUIT, even though I was
> successfully logged in.

No, you were not successfully logged in.  Not until the server sends a 200
as its greeting AND after the AUTH or USER/PASS command has been validated.

> Thanks much in advance for assistance with this!  - Jim

There is nothing you can do about it at this point, unless you alter Indy's
source code manually and then reinstall Indy.  The server should not be
sending a 130 greeting in the first place.  In fact, 130 is not even a valid
greeting code at all.  Only 220 and 120 are allowed by RFC 959.  So the
server is in direct violation of established standards anyway.

Gambit

Replies

In response to

IdFTPServer Automatically Quits After Successful Connection Due To Warning posted by Jim Hallers on Thu, 9 Nov 2006