Re: HTTP1.0/HTTP1.1, persistent connections

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 25 Sep 2000 00:09:42 +0200

Leander Berwers wrote:

> Would it be possible that Squid first reads the response from the
> server, when fully received calculates the length, adds the HTTP-header
> Content-Length and then caches and/or sends the response to the browser?

Not easily, except for cache hits. I think I even have made a patch to
set Content-Length on hits..

> I am asking you this, because this way would be extremely benificial for
> an internet link by satellite, since a round trip time is over 0.5
> second. Therefore establishing a TCP-connection alone takes over 1.5
> seconds at least.

Quite understandable.

> Squid could do a lot by enforcing persistent connections to the browser,
> by adding Content-Length.

Well, yes it is theoretically possible to do what you ask for, but
requires quite a bit of coding. Squids design is not well suited for
this I think, but I might be wrong.

A better approach from many aspects is to support chunked
transfer-encoding of HTTP/1.1 to not require content-length for message
delimiting. There is a implementation of transfer-encoding translation
on squid.sourceforge.net. It might require some polishing, but should
allow one to do what you want quite easily as long as both sides of the
sattelite link supports chunked transfer encoding (ether proxy<->proxy
or client<->pxoxy).

Another viable approach for high latency links is to have a pool of idle
TCP connections already established.

--
Henrik Nordstrom
Squid hacker
--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Sun Sep 24 2000 - 17:03:14 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:55:27 MST