Re: HTTP HEAD request

Ian S. Graham (
Fri, 7 Apr 95 14:21:13 EDT

From: "Ian S. Graham" <>
Message-Id: <>
Subject: Re:  HTTP HEAD request
Date: Fri, 7 Apr 95 14:21:13 EDT

> >Currently, the server doesn't need to parse the document at all.
> >This would be the first such case.  (systems with server-side includes 
> >already do some parsing, though).
> True, but the parse is pretty easy, and it can stop when it reaches
> <BODY>. This type of request would not be used very often, only
> for indexing tools, existence checks, robots, etc.
> >What should it do for a document without a HEAD?
> This could happen for non-html fetches, of course.
> It should return an error - my first impulse, not having thought
> about it much.
> Similarly, I guess it should return an error if it got EOF before
> </HEAD>. Either that, or it might be probably easier to just send
> the whole document part after <HEAD> til EOF, assuming it is scanning
> for <HEAD>, then just outputing chars until </HEAD>.

The HEAD and BODY tags are *not* mandatory under the current draft of 
the HTML 3.0 RFC.  This makes the parsing somewhat more difficult --
I suppose you could parse until you find the first non-HEAD element, 
assuming that all documents have the elements in the correct order....

I believe the RFC should make the HEAD and BODY tags mandatory.  It's 
not such a big deal, and makes enforcement of good document structure 
a lot easier.

Ian Graham ..................................
Instructional and Research Computing
University of Toronto