Re: Last-Modified in chunked footer
Jeffrey Mogul (mogul@pa.dec.com)
Fri, 05 Sep 97 16:24:48 MDT
I've been thinking about this issue for a few days. My original
message, discussing just the effects on proxies, was clearly
insufficient; there are many user agents that want to see some
of the headers before the entire message has arrived, so that
(for example) they can start rendering HTML as it arrives.
But I think we are running into a basic confusion between
what is "necessary" and what is "fast".
The original motivation for trailers was to allow a server
that was generating content on the fly to send a header
(e.g., Content-MD5) that could not be generated before the
entire content.
Similarly, the desire of a browser to see, say, Content-type
at the beginning of a message is so that it can render the
message "on the fly".
And the analysis that I sent a few days ago looked at
what a proxy would need to know in order to forward a response
"on the fly", without having to first buffer it.
Clearly, if a response is based on a static value, it seems
preferrable (and easiest) if the server puts the headers before
the content. The trickier question is for dynamically-generated
responses.
In many (most) cases, any implementation (server, proxy, or client)
could, in principle, buffer the entire message so that it
would not be handled on the fly. While this would certainly
add latency (perhaps unacceptable latency), it would not force
incorrect behavior. (This assumes that the client *knows* that
it needs to buffer the message, which is a separate issue).
In some cases, however (such as an indefinitely long server push),
it is actually impossible to buffer the entire response at any
point. In such cases, one clearly needs to put the headers
before the content! This would seem to preclude the use of
Content-MD5 (and some forms of Digest Authentication?) in these
cases.
In all of the other cases of responses "generated on the fly",
however, the question seems to be "who gets stuck having to buffer
the entire message?" If there are any header fields whose value
depends on the value of the body, one end (at least) is going
to have to do this. It could either be the sender or the receiver;
which one makes more sense?