> I think this is what you meant, no?

Yes, but this code has been updated and there is now a variable FKeepAlive that 
keep track of this
connection problem. You should download latest release.

--
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: "Bruno Sonnino" <[EMAIL PROTECTED]>
To: <twsocket@elists.org>
Sent: Sunday, May 22, 2005 10:39 PM
Subject: Re: Re[2]: [twsocket] Connection not closed in WebServer with IE


> Taking a look at SendDocument, I saw this:
>
>     { *DAVID* Revised this if/then/else }
>     if FVersion = 'HTTP/1.0' then begin
>         if CompareText(FRequestConnection, 'keep-alive') <> 0 then
>             Header := Header + 'Connection: Close' + #13#10
>         else
>             Header := Header + 'Connection: Keep-Alive' + #13#10;
>     end
>     else if FVersion = 'HTTP/1.1' then begin
>         if CompareText(FRequestConnection, 'close') = 0 then
>             Header := Header + 'Connection: Close' + #13#10
>         else
>             Header := Header + 'Connection: Keep-Alive' + #13#10;
>     end;
>
> I think this is what you meant, no?
>
> Adding these lines, the progress bar disappeared, but the connection
> remained open:
>
>         if FVersion = 'HTTP/1.0' then begin
>             if CompareText(FRequestConnection, 'keep-alive') <> 0 then
>                 PutStringInSendBuffer('Connection: Close' + #13#10)
>             else
>                 PutStringInSendBuffer('Connection: Keep-Alive' + #13#10);
>         end
>         else if FVersion = 'HTTP/1.1' then begin
>             if CompareText(FRequestConnection, 'close') = 0 then
>                 PutStringInSendBuffer('Connection: Close' + #13#10)
>             else
>                 PutStringInSendBuffer('Connection: Keep-Alive' + #13#10);
>         end;
>
> Bruno
> On 22/5/2005 16:50:11, Francois PIETTE ([EMAIL PROTECTED]) wrote:
> > > Finally, I could find what was causing the problem here - I still
> > don't
> > know
> > > why, but at least I could fix it.
> > >
> > > I analyzed the header files sent by a virtual page and an identical real
> > > page. The difference was the virtual page was not sending three lines:
> > >
> > > Accept-Ranges: bytes
> > > Last-Modified: Sun, 22 May 2005 14:56:22 GMT
> > > Connection: Keep-Alive
> > >
> > > Then I added these to my header in the virtual page and everything
> worked
> > > fine. I've
> > tracked that the only one needed is "Connection: Keep-Alive",
> > the
> > > others
> > don't make any difference. If anybody knows why this line is
> > needed,
> > > I'll
> > be pleased to know.
> >
> > You can try this mod into the HTTP server component:
> >
> > In THttpConnection.AnswerStream, add the following block just after the
> > lines with Content-Length:
> >
> > if FKeepAlive then
> > PutStringInSendBuffer('Connection: Keep-Alive' + #13#10)
> > else
> > PutStringInSendBuffer('Connection: Close' + #13#10);
> >
> > Tell me if it works without adding the header line in your code.
> >
> > --
> > [EMAIL PROTECTED]
> > 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