The HTTP client component doesn't make any difference whatever the document type is. It is exactly the same processing for a HTML document or a ZIP file.
It is likely that the server react differently when you get a simple HTML file and get a ZIP file. Maybe it is a server side script which deliver the zip file and this script may depends on cookie grabbed somewhere and sent along with the request, or the script use HTTP header lines sent by the browser to check for client type and the likes. So the sort out the problem, you have to use a sniffer (Such as Ethereal) or a spying proxy (such as SocketSpy) to analyse the successful request sent from a browser. You'll see what the browser send exactly (cookies and header lines included). Then you can change your request send with the HTTP component accordingly. BUT the first step is to use the HttpTst program delivered with ICS and try to download various zip files located on various public servers. If it doesn't work, then you may have a problem with your ICS installation. Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) http://www.overbyte.be ----- Original Message ----- From: "Marc A. Hale" <[EMAIL PROTECTED]> To: <twsocket@elists.org> Sent: Thursday, June 08, 2006 11:22 PM Subject: [twsocket] httpcli downloading zip files > i'm using the httpcli to download http files. if i do a get a a html page is fine. > > if i try to download a file like a zip file it always comes down as 1 byte and never downloads the file. the file extension is .slp which > is a zip file and works fine directly from browser. is they anything > different i have to do to download a file like a zip,txt, doc or > anyting. > > also where can i get a help file with on the options and descriptions > > > this is being used in a dll here is the code > > Http1 := THttpCli.Create(nil); > http1.Username := strpas(username); > http1.Password := strpas(password); > if enableproxy then > Begin > http1.Proxy := proxyserver; > http1.ProxyPort := proxyport; > http1.ProxyUsername := ProxyUser; > http1.ProxyPassword := Proxypass; > end; > try > http1.URL := StrPas(url); > http1.RcvdStream := TFileStream.Create(strpas(outfile), fmCreate); > http1.Get; > showmessage(http1.ContentType); > except > showmessage('ERROR > CODE:'+IntToStr(http1.StatusCode)+#13+'STATUS:'+http1.ReasonPhrase); > end; > http1.RcvdStream.Free; > http1.RcvdStream := nil; > http1.free; > > > -------------------------------------------------------------------------- ------ > Marc A. Hale > MJK Software Writers > [EMAIL PROTECTED] > -- > 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 -- 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