>   ClientCnx.OnRequestDone := RequestDone;

You can't heve this line. It doesn't even compile with it.
I have remived it from your source, put your source into WebServ demo and it
works perfectly using IE 6 as client.

Are you really using latest ICS version ?

--
[EMAIL PROTECTED]
http://www.overbyte.be


----- Original Message ----- 
From: "Bruno Sonnino" <[EMAIL PROTECTED]>
To: "'ICS support mailing'" <twsocket@elists.org>
Sent: Saturday, May 21, 2005 11:18 AM
Subject: RE: [twsocket] Connection not closed in WebServer with IE


> François:
>
> I tried to close the connection using the event OnRequestDone, this closed
> the connection ok, but in some clients, the page wasn't even shown, any
hint
> on what could be happening?
>
> procedure TWebServForm.CreateVirtualDocument_Time(
>     Sender    : TObject;            { HTTP server
          }
>     ClientCnx : TMyHttpConnection;  { Client connection issuing
mand    }
>     var Flags : THttpGetFlag);      { Tells what HTTP server has to do
next}
> var
>   Body : String;
>   Header : String;
>   i: Integer;
> begin
>   Body := '<HTML>' + '<HEAD>' + '<TITLE>Pagina de teste </TITLE>' +
>           '</HEAD>' + #13#10 +  '<BODY>';
>   for i := 1 to 5000 do
>     Body := Body + '<br>This is line number '+IntToStr(i);
>   Body := Body+'</BODY></HTML>';
>   Header := 'Pragma: no-cache' + #13#10 +  { No client caching
se     }
>           'Expires: -1'      + #13#10 +
>           'Set-Cookie: Usuario=a; path=/'+ #13#10 +
>           'Set-Cookie: Senha=a; path=/'+ #13#10;
>   ClientCnx.OnRequestDone := RequestDone;
>   ClientCnx.AnswerString(Flags,'','',Header,Body);
> end;
>
> procedure TWebServForm.RequestDone(Sender : TObject);
> begin
>   TMyHttpConnection(Sender).Close;
> end;
>
> Bruno
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Bruno Sonnino
> Sent: Thursday, May 19, 2005 3:55 PM
> To: twsocket@elists.org
> Subject: Re: [twsocket] Connection not closed in WebServer with IE
>
> François:
>
> I replaced your Time function with this one, now when you try the time
> function in IE, the progressbar stays there and the client is not
> disconnected (you can see the client connected in the server panel). In
> FireFox this doesn't happen:
>
> procedure TWebServForm.CreateVirtualDocument_Time(
>     Sender    : TObject;            { HTTP server
          }
>     ClientCnx : TMyHttpConnection;  { Client connection issuing
mand    }
>     var Flags : THttpGetFlag);      { Tells what HTTP server has to do
next}
> var
>   Body : String;
>   Header : String;
>   i: Integer;
> begin
>   Body := '<HTML>' +
>           '<HEAD>' +
>             '<TITLE>Pagina de teste </TITLE>' +
>           '</HEAD>' + #13#10 +
>           '<BODY>';
>   for i := 1 to 5000 do
>     Body := Body + '<br>This is line number '+IntToStr(i);
>   Body := Body+'</BODY></HTML>';
>   Header := 'Pragma: no-cache' + #13#10 +  { No client caching
se     }
>           'Expires: -1'      + #13#10 +
>           'Set-Cookie: Usuario=a; path=/'+ #13#10 +
>           'Set-Cookie: Senha=a; path=/'+ #13#10;
>   ClientCnx.AnswerString(Flags,'','',Header,Body);
> end;
>
>
> Bruno
> On 19/5/2005 15:02:20, Francois PIETTE ([EMAIL PROTECTED])
wrote:
> > I
> > don't know the context of this code. I find strange to have a local
> > variable "Flags".
> > Have you looked at the WebServ delo provided with ICS ?
> > See TWebServForm.CreateVirtualDocument_Time as an example of
AnswerString
> > use.
> > Put your code into that sample program.
> > --
> > [EMAIL PROTECTED]
> > http://www.overbyte.be
> >
> >
> > ----- Original Message -----
> > From: "Bruno Sonnino" <[EMAIL PROTECTED]>
> > To: <twsocket@elists.org>
> > Sent: Thursday, May 19, 2005 7:02 PM
> > Subject: Re: [twsocket] Connection not closed in WebServer with IE
> >
> >
> > > Francois:
> > >
> > > Yes, I am. The full code (it has been cut from my last message) is:
> > >
> > > var
> > >   Flags: THttpGetFlag;
> > >   i : Integer;
> > >   Body : String;
> > >   Header : String;
> > > begin
> > >   Flags := hgWillSendMySelf;
> > >   Body := '<HTML>' +
> > >           '<HEAD>' +
> > >             '<TITLE>Pagina
> > de teste
> > </TITLE>' +
> > >           '</HEAD>' + #13#10 +
> > >           '<BODY>';
> > >   for i := 1 to 1000 do
> > >     Body := Body +
>
>
> -- 
> 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
>


--
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