Juliusz Chroboczek <[EMAIL PROTECTED]> writes:

> AB> A web proxy must be able to handle servers that don't provide
> AB> Content-Length on one side and a client that cannot handle chunked
> AB> encoding on the other side.
> 
> Sure.  Did I say the contrary?

You said:

"In ... Polipo, for example, Content-Length will make the proxy avoid
the overhead of chunking to the client."

The presence or absence of Content-Length alone is not enough to
decide whether to use chunked encoding or not.  Obviously you didn't
mean that Content-Length alone was what decides on the presence or
absence of chunked encoding.  But on the other hand the negation of
your sentence is not clear, so I stated the independence of the two
features in some cases.


> AB> It will depend very much on the implementation of the proxy or client
> AB> how much more difficult it is to handle replies that don't have a
> AB> Content-Length.
> 
> It's actually easier, since you don't have to bother with all the
> optimisations you could do if you had a Content-Length ;-)
> 
> AB> The simple absence of a Content-Length is not in itself enough to stop
> AB> the use of pipelining.
> 
> Na�ve usage of pipelining causes blocking of requests in the pipeline
> behind larger objects, and Polipo will use Content-Length information
> to make an educated guess whether it's wortwile to pipeline.  Lack of
> Content-Length will make its guesses less educated.

For the chain of communication in web requests there are three types
of programs (server, proxy and client) that might all have different
opinions of the headers they would prefer.  The server probably
prefers chunked encoding since it serves so much dynamic content.  The
proxy might not care (WWWOFFLE) or it might prefer Content-Length
(Polipo).  Who knows what the browser prefers, if it is parsing the
content into markup tags then it probably doesn't care too much as
long as there is a stream of bytes.

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             [EMAIL PROTECTED]
                                      http://www.gedanken.demon.co.uk/

WWWOFFLE users page:
        http://www.gedanken.demon.co.uk/wwwoffle/version-2.8/user.html

Reply via email to