[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Link header in HTTP 4xx response



On Wed, Apr 23, 2008 at 11:27 PM, Subbu Allamaraju <subbu@xxxxxxxxx> wrote:
> How about a Location header?
>
The definition of Location header seems to imply more expectation on
recipient (redirect the recipient) and the meaning of the URI
(identification of a new resource).

HTTP/1.1 Section 14.30:
"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."

Link header is chosen mainly because URI can be explicitly typed with
'rel' parameter. 409 Conflict + 'duplicate' link relation clearly
convey the message (this is a conflict error, here is the duplicate
entry's URI).

Since AtomPub-based interaction is about manipulating resources,
(perhaps) this includes error-handling use cases. Handling
duplicate-entry-rejection error is one use case. Returning proper HTTP
error code + typed URIs might be useful in other use cases as well.
So, just want to make sure such usage of Link header is valid.

-- 
Teo Hui Ming