Re: Representation<T> and Entity<T>

From: Roy T. Fielding <>
Date: Wed, 11 Apr 2007 12:26:25 -0700

On Apr 11, 2007, at 2:55 AM, Jerome Louvel wrote:
>>> @RedirectRef is strictly equivalent to "ContentLocation" and
>>> @Location.
>> But the two are different, Location is used outside of redirects,
>> e.g. with a 201 response. IMO it would be confusing to use some kind
>> of Redirect annotation where you aren't actually redirecting.
> HTTP definition of the "Location" header:
> "The Location response-header field is used to redirect the
> recipient to a
> location other than the Request-URI for completion of the request or
> identification of a new resource."

Now that's a poorly constructed sentence. The last "or" refers back
to the "is used". In other words, Location is used for identification
of a new resource or redirection to a new location.

> Note that they mention "to redirect", so @RedirectRef seems more
> explicit
> and removes the ambiguity with the other "Content-Location" HTTP
> header.

Nope. There are at least four distinct types of redirection in
addition to the other uses of Location. A meaningful annotation
should distinguish the semantics rather than match the HTTP field
names that happen to be reused in various ways.