Peter,
   Good thought, but it is a blocking call. It works fine on some files. 
It now seems to be sensitive to file size, maybe.

  It works with a file size of 24,547K but not 25,030K ????

Doug



Peter Luijer wrote:
> Hi Doug,
>
> Just a thought, I'm not familiar with CGI, but...
>
> Is the Response.SendResponse-method by any chance non-blocking
> (asynchronous)?
> If so, you should wait freeing the filestream until all data has been sent.
>
> Greetz,
>
> Peter.
>
>
> -----Oorspronkelijk bericht-----
> Van: [email protected] [mailto:[email protected]]namens Doug
> Hale
> Verzonden: vrijdag 29 mei 2009 20:37
> Aan: [email protected]
> Onderwerp: [delphi-en] Problems downloading large files with Delphi7 CGI app
>
>
>
>
>
> I am using Delphi 7 and Apache 2.2.10 on Windows XP Ver 2002 service pack 3
>
> I have a CGI application that provides access to PDF files.
>
> During the download of larger files, the CGI exe just unloads without
> finishing the transfer.
>
> My Code:
> Filename := Path+Document+'.pdf';
> Fs := TFileStream.Create(Filename, fmOpenRead, fmShareDenyNone);
> Response.ContentType := 'application/pdf';
> Response.ContentStream := Fs;
> Start := DateTimeToTimeStamp(Now);
> Response.SendResponse;
> Fs.Free;
>
> Response.SendResponse never returns, the exe just unloads.
>
> Is there something I'm not doing that I should or something I did that I
> shouldn't?
>
> Doug
>
>
>
> ------------------------------------
>
> -----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> To unsubscribe: [email protected]! Groups Links
>
>
>
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.339 / Virus Database: 270.12.46/2142 - Release Date: 05/29/09 
> 17:53:00
>
>   


Reply via email to