Re: PATCH draft

Mark Baker wrote:
> (removed atom-protocol)
> 
> On 7/12/07, James M Snell <jasnell@gmail.com> wrote:
>>   * 200 responses MUST include a representation of the modified
>>     resource. 204 responses are used to indicate successful response
>>     without returning a representation.
> 
> Please don't do that.  If a server wants to return a representation of
> the modified resource, it can do so and signal it (Content-Location).
> Requiring any particular response prevents it from being used for
> other things.
> 

The goal is to allow for an unambiguous response.  If the use of the
Content-Location header in the response would be enough to eliminate any
ambiguity, then I'm fine with that.

> It also seems a bit odd considering that the intent of PATCH is - like
> PUT - to set the state of the resource explicitly, so in general,
> after a successful response the client pretty much knows the state and
> so the representation is probably not communicating much.
> 

For a byte or character based patch, this is likely true.  For a
structural patch (e.g. adding an XML attribute) on something like an
Atompub collection, it's not so straightforward.  The semantics of a
particular patch format and the specific implementation may allow a
server to apply a patch in a not-entirely-deterministic way.

- James

Received on Monday, 16 July 2007 22:06:21 UTC