Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D32F21C18 for ; Wed, 20 Apr 2011 20:21:10 +0000 (UTC) Received: (qmail 72494 invoked by uid 500); 20 Apr 2011 20:21:09 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 72464 invoked by uid 500); 20 Apr 2011 20:21:09 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 72456 invoked by uid 99); 20 Apr 2011 20:21:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2011 20:21:09 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.214.180 as permitted sender) Received: from [209.85.214.180] (HELO mail-iw0-f180.google.com) (209.85.214.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2011 20:21:03 +0000 Received: by iwn6 with SMTP id 6so1577507iwn.11 for ; Wed, 20 Apr 2011 13:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=osaQyu885ezz8bNS3xLdt4ae/fmStyJRiiTgLN9dHIc=; b=CQ7PsSV/h4i9449i3Saj0d7RMMdRpyeOaDWiKj6We5XMkNiMlmIyyk7+g1h1gTuj9N +hJHiKvAhIWNIY1mLhcPBEyowYzHKhk9xG2PAm5t0qg9ExBChfq5otF0S3Le098oPziY PYfGDNzeSwgUa1c/lUCL1pRgJdpGyRf6ZKD+o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=biwhZZXKhwmmXoqLZ3w2VbmEjNylPy1uL2w2wwEqOF+1SSPsGHQlZKaAet8kM6YvyS SePOYCGwYFizEpVQrAcm8pPktkfyjUnsM6MV6JB7dRUektN1z2Sn+o6f2tSHTuXPOYuh witXSVnvILocP8fGuKj103eM8nQYC5LuCgTuM= Received: by 10.231.3.76 with SMTP id 12mr5890222ibm.166.1303330841997; Wed, 20 Apr 2011 13:20:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.164.232 with HTTP; Wed, 20 Apr 2011 13:20:01 -0700 (PDT) In-Reply-To: References: <1303324273.25024.1301.camel@dynamo> From: Paul Davis Date: Wed, 20 Apr 2011 16:20:01 -0400 Message-ID: Subject: Re: JSON-Patch To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Apr 20, 2011 at 3:59 PM, Aur=E9lien B=E9nel = wrote: > Dear Paul, > >> On the other hand, there's nothing inherently wrong with the PATCH verb > > True, PATCH could be idempotent... It just depends on your patch format. > > I just had a look at your patch operations specification: > - When you add or remove a key/value, this is idempotent. > - However, when you add or remove an array element based on an index, thi= s is not. > > > Regards, > > Aur=E9lien Ah, fair point. I should've said there's nothing inherently wrong with submitting a diff via POST (not PUT). And in fact RFC 5789 says that PATCH is not safe or idempotent. On the other hand, I have no idea how that has anything to do with REST. Of specific note, Fielding himself calls out the PATCH verb as an acceptable extension of the underlying protocol for a REST API [1]. [1] http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven