Re: [twsocket] Sending a file with HTTPSERVER as response

2005-12-07 Thread Fastream Technologies
Here is what I do. After I receive the file with OnPostedData, I manually call SendDocument within the same event. You need to check for socket errors and content-length (FRequestContentLength). If you need more examples, let me know if you can read C++. Best Regards, SZ - Original

Re: [twsocket] Sending a file with HTTPSERVER as response

2005-12-07 Thread jurik
I have tried the following: ClientCnx.FDocument:='c:\1.zip'; ClientCnx.SendDocument(HttpSendDoc); When I send the request from the browser, the file is displayed in the browser in asci format and the browser does not come up with a save dialog. I dont have a C++ compiler (dont know much

Re: [twsocket] Sending a file with HTTPSERVER as response

2005-12-07 Thread Fastream Technologies
I think to achieve your goal, you may need something like: String contentLength = Content-Length: + String(Body.Length()) + \r\n; String Header(FVersion + 500 Server Error\r\n + contentLength + Content-Type:

Re: [twsocket] Sending a file with HTTPSERVER as response

2005-12-07 Thread Fastream Technologies
OOPS! You need to write: Content-Length: + DocumentToContentType(FDocument) + \r\n SZ - Original Message - From: Fastream Technologies [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Wednesday, December 07, 2005 5:39 PM Subject: Re: [twsocket] Sending a file with