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

Tres Seaver tseaver@zope.com
09 Jan 2003 15:30:48 -0500


On Thu, 2003-01-09 at 10:10, Willem Broekema wrote:
> Shane Hathaway wrote:
> > Jim Fulton wrote:
> >> Then again, as a practical matter, we will end up providing WebDAV and
> >> PUT is just a subset. In the short term, however, I want PUT and I don't
> >> want to have to implement all of WebDAV just to get PUT.
> > 
> > Note that PUT doesn't necessarily imply WebDAV--it's part of the HTTP 
> > spec.  So you're justified in wanting to implement PUT without 
> > implementing WebDAV.
> 
> The same is true for HEAD: it's both an important regular HTTP method 
> and used in WebDAV.
> 
> Zope 2.x always lets the WebDAV code handle HEAD requests, which is 
> wrong and leads to high unneeded bandwidth waste in certain situations: 
> <http://collector.zope.org/Zope/564>.

Your expectations of HEAD *cannot* be satisfied for arbitrary, dynamic
content:  the 'Content-length' header cannot be computed properly for
the rendered version of the content without actually rendering it, which
makes the HEAD request just as expensive as a GET, without actually
getting the data!

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.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com