Hallo NG!
In meiner Anwendung nutze ich einen Service von Yahoo,
um Aktienkurse mit IdHTTP (Indy 10) downzuloaden.
Über viele Monate lief die Anwendung fehlerlos,
bis auf einmal eine Exception auftrat, - obwohl ich überhaupt nichts verändert hatte
Als Beispiel hier der Abruf einer Autoaktie.
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
| procedure TForm1.Button1Click(Sender: TObject); var http: TIdHTTP; ms: TMemoryStream; UrlStr : string; begin UrlStr := 'http://finance.yahoo.com/d/quotes.csv?s=BMW.DE&f=l1'; http := TIdHTTP.Create (nil); http.HandleRedirects := true; ms := TMemoryStream.Create; http.Get (UrlStr, ms); --> Exception der Klasse EIdIOHandlerPropInvalid mit Meldung 'IOHandler value is not valid' end; |
Die Position in unit IdHTTP (IdHTTP.pas), wo der Fehler ausgelöst wird, ist:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10:
| ... function TIdCustomHTTP.SetHostAndPort: TIdHTTPConnectionType; ... if TextIsSame(URL.Protocol, 'HTTPS') then begin if (not Assigned(IOHandler)) or (not (IOHandler is TIdSSLIOHandlerSocketBase)) then begin raise EIdIOHandlerPropInvalid.Create(RSIOHandlerPropInvalid); end; ... ... |
Leider fehlen mir die Neztwerkkentnisse, um weiterzukommen -
wäre toll, wenn jemand helfen könnte.
Gibt man übrigens den UrlString direkt in einen Browser ein,
lässt sich der Kurs ohne Probleme als csv-File downloaden.
Nutze TD Prof mit Indy 10
Daniel L.