HEAD (was Re: Link Verification)

phantom@baymoo.sfsu.edu (Richard Connamacher) writes:
   I personally am having trouble implimenting the HEAD method, even
   though the HTTP 1.1 specs, which I am trying to follow, require it.
   The problem is that my server is designed to generate pages on the
   fly, and each page, in all likelyhood, will be different every time
   the client retrieves it.  Some pages actually carry out an action,
   such as move your virtual persona into a new confrencing area,
   although sensitive actions would be reserved for POST requests.
   What would be the standard response in this case?  Right now, it
   only responds with 501 Not Implimented.

The HTTP/1.1 draft says (section 19.2):
    In particular, the convention has been established that the GET and
    HEAD methods should never have the significance of taking an action
    other than retrieval. These methods should be considered  "safe. "
    This allows user agents to represent other methods, such as POST,
    PUT and DELETE, in a special way, so that the user is made aware of
    the fact that a possibly unsafe action is being requested.

    Naturally, it is not possible to ensure that the server does not
    generate side-effects as a result of performing a GET request; in
    fact, some dynamic resources consider that a feature. The important
    distinction here is that the user did not request the side-effects,
    so therefore cannot be held accountable for them.

In other words, I think the correct action for your server to take
for a HEAD request is to generate whatever it would generate for
a GET request, but then just drop the entity-body on the floor.

I have to admit that I'm not sure it's always possible to
implement a server such as yours following this rule (i.e.,
using POST for all "action" requests).  But that's the way
we have been expecting people to go.  If you have a specific
example that simply cannot be done this way, it might help
people think about possible solutions.

-Jeff

Received on Wednesday, 8 May 1996 13:44:02 UTC