Re: KeepAlive with TIdHttp

Giganews Newsgroups
Subject: Re: KeepAlive with TIdHttp
Posted by:  Remy Lebeau \(Indy Team\) (no.spam@no.spam.com)
Date: Mon, 1 Oct 2007

"Thomas Bergerot" <nospam@nospam.fr> wrote in message
news:DF5618267E37E340nospam@nospam.fr...

> When i connect to the server with the client (using TIdHttp),
> the connection is closed right after the request.

TIdHTTP uses HTTP v1.0 by default, which does not normally use keep-alives.

> When i connect using a normal browser, the connection is kept alive
> successfully.

The browser is likely using HTTP v1.1 instead, which does use keep-alives by
default.

> How can i make it work with my TIdHttp client ?

Set the ProtocolVersion property to pv1_1, and/or set the Request.Connection
property to 'keep-alive'.

Gambit

Replies

In response to

KeepAlive with TIdHttp posted by Thomas Bergerot on Sun, 30 Sep 2007