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

Re: Is <accept> establishing a contract?



* Jan Algermissen <algermissen1971@xxxxxxx> [2008-05-07 01:10]:
> Does a collection that declares acceptance of a media type
> implicitly declare conformance to any processing model/contract
> the media type defines (if so)?

No. All it means is that the server claims that it will accept
POSTs and PUTs with that media type and do something with them.
It isn’t even a guarantee that the server will actually behave
that way.

As a somewhat plausible example of how this could actually happen
in practice, a sloppily coded server that accepts only a few
media types might just declare that it accepts the union of all
of them for each collection even though not all collections
accept all of them, and for the most part, this would cause a
wasted requests but shouldn’t actually break any client that
behaves correctly (ie. expects any applicable HTTP status
whatsoever in response to any request).

So in some sense the app:accept element is just advisory.

> Is <accept> suitable for allowing the client to reasonably
> expect conforming behavior of the collection?

See above, no. If the client really needs to know that the
server will exhibit a very particular behaviour, the server
needs to declare that explicitly.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>