Re: Idempotent partial updates

On 2012-02-28 05:28, Martin Thomson wrote:
> I think that the "problem" in this case is one of invention only.  If
> you desire the ability to do a partial update of a resource, then you
> probably don't have enough resources.  I know that's a gross
> generalization, but I haven't seen that comment in the thread.
>
> I agree with Mike that PATCH (or a special POST) aren't visibly
> idempotent, which is a crucial characteristic if this is going to
> work.

How exactly is it "not visible"?

 From <http://greenbytes.de/tech/webdav/rfc5789.html#rfc.section.2.p.4>:

"A PATCH request can be issued in such a way as to be idempotent, which 
also helps prevent bad outcomes from collisions between two PATCH 
requests on the same resource in a similar time frame. Collisions from 
multiple PATCH requests may be more dangerous than PUT collisions 
because some patch formats need to operate from a known base-point or 
else they will corrupt the resource. Clients using this kind of patch 
application SHOULD use a conditional request such that the request will 
fail if the resource has been updated since the client last accessed the 
resource. For example, the client can use a strong ETag [RFC2616] in an 
If-Match header on the PATCH request."

Best regards, Julian

Received on Tuesday, 28 February 2012 08:38:16 UTC