Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Feb : App with TIdHttpServer blocks browser

www.cryer.info
Managed Newsgroup Archive

App with TIdHttpServer blocks browser

Subject:App with TIdHttpServer blocks browser
Posted by:"Christian Kaufmann" (christian.kaufma..@gmx.net)
Date:Sun, 27 Feb 2005 15:28:51

Hi,

I have an application with a TIdHttpServer. In the request I create a
response stream and send a pdf document to the browser:


  f := TFileStream.Create('myfile.pdf', fmOpenRead);
  AResponse.ContentType := AContentType;
  AResponse.FreeContentStream := True;
  AResponse.ContentStream := TMemoryStream.Create;
  AResponse.ContentStream.CopyFrom(f, 0);
  f.Free;

I have the problem, that the browser sometimes is blocked until I shut
down my http server application. Then the sent pdf is displayed
correctly.

If I step through my application, the browser never gets blocked.

Does anybody have an idea, where I should search for the problem?

cu Christian

Replies:

www.cryer.info
Managed Newsgroup Archive