Scrive Johnnie Norsworthy <[EMAIL PROTECTED]>:

> I am having an issue with downloading by HttpCli.
> 
> I am doing a really simple synchronous download of a binary file:
> 
>   HTTP.RcvdStream := TFileStream.Create(UpdateFileName,fmCreate);
>   HTTP.URL := RemoteFileName;
>   Application.ProcessMessages;
>   HTTP.Get;
>   TFileStream(Http.RcvdStream).Free;

No need to cast to call the free method.

> The file appears to be retrieved fine, and the resultant file size matches
> the one on the web, but it is an executable file and does not run afterward.
> So I am assuming it is being corrupted in some way.

Try to download the same file using a browser, then compare both results.

> Is there a special
> mode/property for downloading binary files? I did not see any mention of it
> in the FAQ.

No. Avoid to call ProcessMessage (even indirectly) within the events.

> I am converting a small indy application that used that HTTP component into
> ICS. I prefer to retrieve the web file by HTTP, but I can convert to ICS FTP
> is absolutely necessary.

No need to switch to ftp.


Bye, Maurizio.

----------------------------------------------------
This mail has been sent using Alpikom webmail system
http://www.alpikom.it

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to