[Zope-dev] Last-modified and bobobase_modification_time
Oliver Bleutgen
myzope@gmx.net
Tue, 18 Jun 2002 10:46:16 +0200
Wei He wrote:
> On Mon, 17 Jun 2002, Dieter Maurer wrote:
>
>
>>R. David Murray writes:
>> > ...
>> > Well, there's two aspects to this. The first one is the quesiton of
>> > *why* the last modified header is currently that of the outermost
>> > page template. That's a zope@zope.org question. The second is
>> > the question of whether or not that is the "right" behavior, and what
>> > it would take to make Zope smarter such that the last modified header
>> > would actually be accurate.
>>Think about it. It is very difficult.
>>
>> In order to determine the accurate modification time, you need
>> to render the template (as it is non-trivial to determine the
>> set of objects the rendering depends on without actually
>> doing the rendering).
>>
>> Rendering may produce side effects. But "HEAD" requests
>> are required by HTTP not to have side effects. Thus,
>> you cannot have accurate modified headers for "HEAD" requests.
>> Moreover, usually "HEAD" requests do not pass the necessary
>> parameters for template rendering.
>
>
> Would please go a little bit deeper giving an example what information
> HEAD requests don't pass to the server, although it's beyond this topic.
HEAD requests are required to have no side effects. On the other hand
they are required to return the same response as GET requests without
the BODY.
So GET returning another last-modified header than HEAD would be in
violation of the RFC. This gets worse by the fact that HEAD can be used
for caching purposes.
cheers,
oliver