[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Appropriate Status Codes
Just a few notes on our status code responses. If anyone has reason to
believe that any of this will cause interop issues, please respond so we
can discuss.
When our server implementation receives an appropriately formed
atom:entry containing a content[@type] we don't support, our current
intention is to return a 403 Forbidden indicating that we're refusing to
process the request. We feel that this is an appropriate response given
the description of the 403 response code in rfc2616:
The server understood the request, but is refusing to fulfill it.
Authorization will not help and the request SHOULD NOT be repeated.
If the request method was not HEAD and the server wishes to make
public why the request has not been fulfilled, it SHOULD describe the
reason for the refusal in the entity. If the server does not wish to
make this information available to the client, the status code 404
(Not Found) can be used instead.
The response entity will indicate that the request was forbidden due to
unacceptable content type.
The other option is to emit a 501 Not Implemented response.
500 is not appropriate given that our refusal to process specific
content types does not qualify as either an "unexpected condition" or a
server failure.
Malformed atom:entries will be rejected with 400 Bad Request
DELETE and PUT operations respond with a 204 No Content
POST on a collection responds with a 201 Created
- James