Erik Hetzner <erik.hetzner <at> ucop.edu> writes:

> I don’t understand what the issue is here? Can you not override
> handleHead?

Yes you could but there's already a programming model for dealing with HTTP
methods. One could argue handle*() methods could be final for example. Why
exclude HEAD from that model?

> Why should you special case getRepresentation?

Because HEAD shouldn't necessarily return a representation.

> The representation should be the same.

No, a very common use case is to use HEAD to get meta-data about a
resource to decide whether to call GET. For example, if the representation
could be extremely large.

> Presumably (correct me if I’m wrong, Restlet
> authors) when sending a response to a head request back to the client
> the server simply won’t make a call to get the actual content of the
> representation. In almost every way the response to the HEAD request
> should be the same to a GET, so it makes sense to share the logic.

Are you saying there's some place in Restlet where the entity is striped
out in the case of HEAD? You might be right, although I didn't see it.
Regardless, that makes unreasonable assumptions about the intent for
HEAD.

> Also, intuitively allowHead is a bit redundant, since any resource
> that allows a GET really should allow a HEAD.

That was John's point which I agree with. Default is true.

Sean

> 
> best,
> Erik Hetzner
> 



Reply via email to