[Zope3-dev] Other (than GET and POST) HTTP Methods

Willem Broekema willem@pastelhorn.com
Fri, 10 Jan 2003 12:49:26 +0100


Tres Seaver wrote:
> The HEAD request is not ideal for use as a "backdoor cache revalidation"
> protocol;  I think you would be better off lobbying for better
> "conditional GET" handling, rather than trying to shoehorn Zope into
> "static" shoes.

Indeed, my need for it arose because "conditional GET" (CG) was not 
implemented. But even if it is, I think standard-compliancy should be a 
goal an sich.


However, it seems to me that implementing CG "right" gives similar 
problems as HEAD: even if the source code of say a ZPT is still the 
same, it could insert the current date/time in it, or call a Python 
script that calculates something dyamically, or inserts database records 
of a database that may have changed, etc.

Implementing CG "right" means determining if the page has changed since 
some previous time, which requires either:

  - a (very difficult?) semantic analyses of the page source code,
    including the code of all the scripts and templates that get
    called indirectly; or

  - internally rendering the page and calculating the ETag and
    comparing it with the one supplied in the page request (verifying
    the time at which the page started rendering differently is
    probably very difficult, too, so just use the ETag instead)

It seems to me that the first option is practically impossible, so the 
page _has to be_ rendered internally for CG.


If it's decided that internally rendering the page here is not 
desirable, either, then we're back to today's situation in which neither 
CG nor HEAD do what they should.


- Willem