Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 53855 invoked from network); 17 May 2009 06:59:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 May 2009 06:59:26 -0000 Received: (qmail 42922 invoked by uid 500); 17 May 2009 06:59:26 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 42835 invoked by uid 500); 17 May 2009 06:59:26 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 42826 invoked by uid 500); 17 May 2009 06:59:26 -0000 Delivered-To: apmail-incubator-couchdb-commits@incubator.apache.org Received: (qmail 42822 invoked by uid 99); 17 May 2009 06:59:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 May 2009 06:59:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 May 2009 06:59:23 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 060D7118BC for ; Sun, 17 May 2009 06:59:02 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: couchdb-commits@incubator.apache.org Date: Sun, 17 May 2009 06:59:01 -0000 Message-ID: <20090517065901.17472.87021@eos.apache.org> Subject: [Couchdb Wiki] Update of "HTTP Document API" by DanLarkin X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification. The following page has been changed by DanLarkin: http://wiki.apache.org/couchdb/HTTP_Document_API ------------------------------------------------------------------------------ {"ok": true, "id": "some_doc_id", "rev": "946B7D1C"} }}} - To update an existing document, you also issue a ''PUT'' request. In this case, the JSON body must contain a ''_rev'' property, which lets CouchDB know which revision the edits are based on. If the revision of the document currently stored in the database doesn't match, then a ''412'' conflict error is returned. + To update an existing document, you also issue a ''PUT'' request. In this case, the JSON body must contain a ''_rev'' property, which lets CouchDB know which revision the edits are based on. If the revision of the document currently stored in the database doesn't match, then a ''409'' conflict error is returned. If the revision number does match what's in the database, a new revision number is generated and returned to the client. @@ -192, +192 @@ And here is the server's response if there is an update conflict (what is currently stored in the database is not revision ''946B7D1C'' of document ''some_doc_id''). {{{ - HTTP/1.1 412 Precondition Failed + HTTP/1.1 409 Conflict Date: Thu, 17 Aug 2006 05:39:28 +0000GMT Content-Length: 33 Connection: close