Aron Roberts wrote:
The HEAD method is identical to GET except that the server MUST NOT
return a message-body in the response.
Would this also imply that the correct HTTP Status code to be returned
from a HEAD request should be 204, corresponding in the Restlet
framework to something like getResponse().setStatus(
Status.SUCCESS_NO_CONTENT )?
NO! The whole point of HEAD is to emulate a GET request, except without
returning the message body. You don't need to send 204 because, by
definition, HEAD already means no content. A call to HEAD should return
_exactly_ the same headers as the same call to GET.
Adam