[Zope] HEAD Requests

Brian Lloyd Brian@digicool.com
Wed, 5 May 1999 09:09:23 -0400


> >My Zope isn't accepting HEAD HTTP requests. I'm receiving 404 'Not
> >Found' errors. GET requests work as expected.
> >
> >Is it usual or is a problem with my configuration? Is there 
> any way to
> >fix it?
> >
> >I'm using the source Zope 1.10.2 with Apache 1.3.3 in an 
> AIX4.1 machine. 
> >
> >This is very serious! Search engines robots usually first make a HEAD
> >request and, just if the file has changed, makes the GET. If HEADs
> >aren't working, my site won't appear in ANY search engine. 
> >
> 
> Zope 1.11pr1 does return information on HEAD requests, because of it's
> webDAV support. The information returned is not always 
> accurate however. It
> does not recognize the fact that a GET request on a folder 
> will return a
> call to the index_html method (if it exists through 
> aquisition, that is.).
> If the index_html document _doesn't_ exist, HEAD still 
> returns a 200 OK...

I'd like to debate this one a little bit. You are correct in that
a HEAD on a folder does not behave in quite the same way as a GET
- that should be fixed. I have tried to use the HTTP spec
and comparisons with the default behaviors of common servers 
(mainly Apache) in determining what HEAD should do.

Note that on apache, if you do a HEAD on a directory that contains 
no "default document", you also get a 200:

HTTP/1.1 200 OK
Date: Wed, 05 May 1999 13:06:48 GMT
Server: Apache/1.3.4 (Unix)
Connection: close
Content-Type: text/html

...so I dont necessarily agree that this is incorrect behavior.


Brian Lloyd        brian@digicool.com
Software Engineer  540.371.6909              
Digital Creations  http://www.digicool.com