Indy Latest SVN Branch Tiburon

Giganews Newsgroups
Subject: Indy Latest SVN Branch Tiburon
Posted by:  Loris Luise (loris.lui…@tiscali.it)
Date: Tue, 03 Mar 2009

Hello,

i think there is a major problem in idFtp (ftpclient component)
with latest SVN update (3500 in changelog).

Thet Get method is no longer getting file correctly,
it either terminates wth 426 error or no error but downloads
only the first 32768 bytes in the stream.... very strange.

Code below is working with a old version of Indy....

Is there any reason for this?
Thanks!

THis is an example

procedure TForm3.btnTestClick(Sender: TObject);
var
    msItem  : TMemoryStream;

begin

  ftpMain.Host    := '127.0.0.1';
  ftpMain.Username := 'ftptest';
  ftpMain.Password := 'ftptest';

  ftpMain.AutoLogin := True;
  ftpMain.TransferType := ftASCII;
  ftpMain.Passive := False;

  ftpMain.UseMLIS := False;
  ftpMain.UseHOST := False;
  ftpMain.AutoIssueFEAT := False;
  ftpMain.ConnectTimeout := 10000;

  try
      ftpMain.Disconnect;
  except
  end;

  ftpMain.Connect;

  if not ftpMain.Connected then
  begin

    Application.MessageBox(PChar('Error in conect'), 'Error', MB_OK +
MB_ICONINFORMATION);
    Exit;

  end;

  msItem := TMemoryStream.Create;
  try

    ftpMain.TransferType := ftBinary;
    try
      ftpMain.Get('test.pdf', msItem);
    except
      Application.MessageBox(PChar('Error in get'), 'Error', MB_OK +
MB_ICONINFORMATION);
      Exit;
    end;

    Application.MessageBox(PChar('Info: ' + intToStr(msItem.Size)),
'Info', MB_OK + MB_ICONINFORMATION);

  finally

    ftpMAin.Disconnect;
    FreeAndNil(msItem);

  end;

end;

Replies