Loading ...
Sorry, an error occurred while loading the content.

9675Re: [rest-discuss] 30x Status codes

Expand Messages
  • Mark Baker
    Oct 2, 2007
      On 10/2/07, Nick Gall <nick.gall@...> wrote:
      >
      > On 10/2/07, Peter Lacey <placey@...> wrote:
      > > Why redirect? Quoting the RWS book " The 303 status code is a good way
      > > to canonicalize your resources. You can make them available through many
      > > URIs, but only have one "real" URI per representation. All the other
      > > URIs use a 303 to point to the canonical URI for that representation.
      > > For instance, a 303 might redirect a request for
      > > http://www.example.com/software/current.tar.gz to the URI
      > > http://www.example.com/software/1.0.2.tar.gz ."
      >
      > Wouldn't using the Content-Location HTTP header field also be a "good way to canonicalize your resources"?
      >
      >
      > The Content-Location entity-header field MAY be used to supply the resource location for the entity enclosed in the message when that entity is accessible from a location separate from the requested resource's URI. A server SHOULD provide a Content-Location for the variant corresponding to the response entity; especially in the case where a resource has multiple entities associated with it, and those entities actually have separate locations by which they might be individually accessed, the server SHOULD provide a Content-Location for the particular variant which is returned.
      >
      > It has the advantage of NOT requiring a round trip.

      In theory, yes. In practice in the wild, not so much. See this thread;

      http://lists.w3.org/Archives/Public/ietf-http-wg/2007JulSep/0269.html

      Mark.
      --
      Mark Baker. Ottawa, Ontario, CANADA. http://www.markbaker.ca
      Coactus; Web-inspired integration strategies http://www.coactus.com
    • Show all 15 messages in this topic