On 12/4/2011 8:36 μμ, Arno Garrels wrote:
Dimitris Botsis wrote:
Hi again,
what I try now is get the non-SSL OverByteIcsHttpDemo, and instead
"Go" button calling httpcli component, it calls an sslhttpcli
component (I also added a proper sslcontext component) so code became
:
procedure THttpToMemoForm.GoButtonClick(Sender: TObject);
var
Data : TMemoryStream;
begin
DisplayMemo.Clear;
GoButton.Enabled := FALSE;
Data := TMemoryStream.Create;
try
sslhttpcli1.URL := URLEdit.Text;
//httpcli1.Proxy := ProxyEdit.Text;
//httpcli1.ProxyPort := '80';
sslhttpcli1.RcvdStream := Data;
sslhttpcli1.Get;
LoadMemoFromMemoryStream(DisplayMemo, Data);
finally
Data.Free;
GoButton.Enabled := TRUE;
end;
end;
As URLEdit1.Text, I set the whole URL up to the file, so it's like :
https://www.mydomain.com/myfile.txt
Can someone please explain or find why this does not work ?
Show us your code in LoadMemoFromMemoryStream.
It makes no difference whether you use a TFile or TMemorystream.
Maybe you simply forgot to rewind the stream before the memo
loads it?
No, LoadMemoryFromMemoryStream is completely untouched and stream is
being rewind. Code is exactly the same.
Now I set to sslhttcli component that I added, "SocksLevel" to 5 (was 0)
and seems to get better but generally it seems rather unstable.
Additionally I have another problem since I want to load all the
contents to a RichEdit but very often I get "Richedit Line insertion
error" but while I used Thttpget (but without SSL support) for some
months it worked without any problem.
I suppose I must search more to find solution using ICS - any
help/instructions is appreciated.
Thank you.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be