Autor Beitrag
Gerhard_S
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98



BeitragVerfasst: Mi 24.10.12 19:11 
Hallo,
laut Doku
www.indyproject.org/...amp;frmfile=idx.html
hat TIdFTP die Methode ExtractFeatFacts: "ExtractFeatFacts is a procedure used to capture the facts associated with the Feature negotiation mechanism for the File Transfer Protocol, as described in RFC 2389. The FTP FEAT command provides a mechanism for identifying new commands, or facilities."
Genau das interessiert mich. Ich hoffe, vom Server eine Auskunft zu bekommen, ob er UTF8 unterstützt.
Die Doku zeigt mir zwar die Syntax
ausblenden Delphi-Quelltext
1:
procedure ExtractFeatFacts(const ACmd: String; AResults: TIdStrings);					

aber ohne ein Beispiel. Ich würde außerdem gern wissen, in welcher Unit TIdStrings definiert werden.
Einfach so
ausblenden Delphi-Quelltext
1:
IdFTP1.ExtractFeatFacts('MLST',FStrings);					

wobei FStrings als TStrings definiert sind, bekomme ich nur eine AV.
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Mi 24.10.12 19:20 
Welche Access Violation kommt denn?

Hast du FStrings auch initialisiert?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
var
  FStrings: TStrings;
begin
  FStrings := TStringList.Create;
  try
    IdFTP1.ExtractFeatFacts('MLST',FStrings);  
  finally
    FreeAndNil(FStrings);
  end;
end;
mandras
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 429
Erhaltene Danke: 107

Win 10
Delphi 6 Prof, Delphi 10.4 Prof
BeitragVerfasst: Mi 24.10.12 20:06 
Wie wäre es mit IsExtSupported ('UTF8')?
Gerhard_S Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98



BeitragVerfasst: Mi 24.10.12 21:31 
user profile iconmandras hat folgendes geschrieben Zum zitierten Posting springen:
Wie wäre es mit IsExtSupported ('UTF8')?

Der Server ist schuld: IsExtSupported liefert false zurück.
Damit scheint unser Problem geklärt.

Moderiert von user profile iconNarses: Beiträge zusammengefasst

user profile iconAndreas L. hat folgendes geschrieben Zum zitierten Posting springen:
Welche Access Violation kommt denn?

Hast du FStrings auch initialisiert?


Daran lags. Trotzdem noch eine Frage:
FStrings.SaveToFile('D:\bla\feat.txt');
als zweite Anweisung nach try (vor dem FreeAndNil) liefert eine leere Datei.
Ist das abhängig vom Server oder wie lässt sich dem Server wenigstens die spärliche Info entlocken, die FileZilla liefert:
Befehl: FEAT
Antwort: 211-Extensions supported:
Antwort: HOST
Antwort: MDTM
Antwort: REST STREAM
Antwort: SIZE
Antwort: MLST Type*;Size*;Modify*;Create;Unique*;Perm*;UNIX.mode;UNIX.owner;UNIX.group;
Antwort: LANG EN*;DE;FR;NL;ES;IT;
Antwort: 211 End.
Befehl: OPTS MLST type;size;modify;perm;unix.mode;unix.owner;unix.group;
Antwort: 200 Done.
Status: Verbunden
Gerhard_S Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98



BeitragVerfasst: Sa 10.11.12 05:43 
ausblenden Delphi-Quelltext
1:
Memo1.Lines.Add(IdFTP1.Capabilities.Text);					

liefert die FEATures.