🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #1155

Keep-Alive, Connection and ProxyConnection...

#1155
From: SD
Date: Mon, 06 Jun 2005 15:01
70 lines
3032 bytes
Hi to all,
I've a serious problem with Indy (9.0.18) and following system:

Computer A (CA):
- Indy HTTP Client
- Proxy enabled

Computer B (CB):
- Indy HTTP Server
- Direct connection to a dial-up ISP (56K)

The (CA) send a lot of very short requests to (CB)
between Indy HTTP Client, enabled to work with a
proxy which don't require any password and username.

The only HTTP command used is GET and the request is
very simple:

- FHTTP.Get('/?method=GetTime);

The (CB), in the HTTPServer OnCommandGet, parse the request
object and fill the response with:

- AResponseInfo.ResponseNo := 200;
- AResponseInfo.ContentText := IntToStr(timeGetTime);
- AResponseInfo.ContentType := 'text/html';
- AResponseInfo.ContentLength := Length(AResponseInfo.ContentText);

All seem work fine, but at very very low speed, about 300-500ms for
a single GET request.

I've tried to overload the Server work in (CB) with a simultaneous call
of many CA instances (32) and I can see the MODEM data flow increase
but the response timing is always the same (this is been useful
to undestand that mine isn't a problem of low modem throughput
but only an effect of continuos: connect to server, disconnect from server.

At this point I've inserted in my client in (CA) the following lines:

- FHTTP.Request.Connection := 'keep-alive';
- FHTTP.Request.ProxyConnection := 'keep-alive';

to enable the keep-alive mode in client side.

The speed results aren't unfortunately changed again, so
I've tried to set the KeepAlive property of Server in (CB) with

FHTTPServer.KeepAlive := True;

but results are the same.

I've tried again to insert in HTTPServer OnCommandGet the
following lines:

- AResponseInfo.Response.Connection := 'keep-alive';
- AResponseInfo.Response.ProxyConnection := 'keep-alive';

but results are same again.

I've tried to debug INDY source step-by-step and I've
saw that in my:

FHTTP.Response.Connection I've found a '' (empty string);
FHTTP.Response.ProxyConnection I've found a 'close';

What I've to do to obtain a persistent connection by my
HTTP Client in (CA) and HTTP Server in (CB) ?

Thank you very much....
Silverio Diquigiovanni
Technical Details
Message-ID: <42a46567@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,4667c719999db840,start
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "SD" <nospawm@please.it>
Newsgroups: borland.public.cppbuilder.internet.web
Subject: Keep-Alive, Connection and ProxyConnection...
Date: Mon, 6 Jun 2005 17:01:58 +0200
Lines: 72
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 217.168.230.137
Message-ID: <42a46567@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1118070119 217.168.230.137 (6 Jun 2005 08:01:59 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail