Wei He wrote:
On Tue, 18 Jun 2002, Oliver Bleutgen wrote:
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.
Totally understood. But the question is what RFC says about the last-modified header. Shouldn't it reflect the latest update? Zope is facing this problem because it handles the HEAD request seperately. Am I right?
I don't see any need to seperately handle the HEAD request. My hacking of the last-modified header is done execpt that HEAD and wget -S returns different headers. I think the last step is to change the HEAD handling routine to the get information from GET. Does anyone have any idea?
If you *really* want to, you can run a HEAD just like a GET, but after getting your last-modified and other details, abort the transaction to undo side-effects, then return the HEAD response. I would generally recommend against this, as it may end up being rather expensive. -- Steve Alexander