AB> For the chain of communication in web requests there are three types
AB> of programs (server, proxy and client) that might all have different
AB> opinions of the headers they would prefer.

There is a lot of things that the client (whether it is a proxy or a
user-agent) can do if it knows the entity and instance lengths.
Polipo, for example, will use the information for the following (I may
be missing some):

 - indicate the length to the client;
 - restart a connection that was prematurely closed by the server
   (using a Range request, if supported by the server);
 - preallocate certain data structures with a known size, rather than
   allocating them optimistically and realloc-ing them later;
 - avoid chunking the data to an HTTP/1.1 client, or avoid using
   Connection: close with an HTTP/1.0 client;
 - decide whether to pipeline or to open a new connection.

The reason why this doesn't matter for WWWOFFLE is that WWWOFFLE
doesn't bother with any of the optimisations described above.
However, I have no doubt that at some point you will want to implement
some of the above.

For now, I would like to encourage you to provide Content-Length to
clients (user-agents or downstream proxies) whenever possible without
much effort.  Do not spend much time computing Content-Length when it
is not readily available, all clients known to man will manage without
Content-Length.

                                        Juliusz





Reply via email to