[Lazarus] [SPAM] - Re: [SPAM] - Re: THTTPApplication does not close the TCP Connection

Jansen, Dirk DJansen at mmcgmbh.de
Wed Jul 17 17:28:09 CEST 2013


> On Wed, 17 Jul 2013, Jansen, Dirk wrote:
> 
> >>> I tested a simple http application and found that the
> > THTTPApplication
> >>> does not close the connection.
> >>>
> >>> A normal web server always close the connection after sending the
> > HTML
> >> page but this webserver does not close the connection. As a result
of
> >> this every second request from a web browser (Firefox, IE) does not
> >> work. The browser starts the request than it waits for a very long
> > time.
> >> If you interrupt the browser and start a new request you get an
> > answer.
> >
> >> That is not correct.
> >
> >> In HTTP 1.1 The browser sends a HTTP header which determines if the
> > connection should be closed or not.
> >
> >> Secondly, THTTPApplication is an apache module. There it is apache
> > which determines what happens to the
> >> connection, not the FPC code.
> >
> > The THTTPApplication is part of the standalone "HTTP server
Application"
> > (default project) of the weblazextra package. There is no apache
> > server involved.
> >
> > There is no difference if I user http 1.0, http 1.1 or if I set
> > "Connection: close".
> >
> > It is also impossible to send a second request over the open
connection.
> 
> I have tested, and a strace shows that the connection is always
closed:
> 

Yes. My first test with telnet war not OK I think.

But if I try to Access the example server from firefox
(http://localhost:8080:/index.html) I get the website.
If I press F5 (Refresh) the request never ends.
If I press F5 again I get the Website.
If I press F5 again I the request never ends.
If I press F5 again I get the Website.
And so on.

Dirk




More information about the Lazarus mailing list