Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 328 invoked from network); 24 Jan 2011 21:17:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Jan 2011 21:17:15 -0000 Received: (qmail 76714 invoked by uid 500); 24 Jan 2011 21:17:14 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 76660 invoked by uid 500); 24 Jan 2011 21:17:14 -0000 Mailing-List: contact dev-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 dev@couchdb.apache.org Received: (qmail 76652 invoked by uid 99); 24 Jan 2011 21:17:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jan 2011 21:17:14 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of blueonyx@gmx.net designates 213.165.64.22 as permitted sender) Received: from [213.165.64.22] (HELO mailout-de.gmx.net) (213.165.64.22) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 24 Jan 2011 21:17:06 +0000 Received: (qmail invoked by alias); 24 Jan 2011 21:16:44 -0000 Received: from p54BA74C2.dip.t-dialin.net (EHLO [192.168.1.18]) [84.186.116.194] by mail.gmx.net (mp026) with SMTP; 24 Jan 2011 22:16:44 +0100 X-Authenticated: #24497449 X-Provags-ID: V01U2FsdGVkX1+UWgE8Sz6UFnd7qaa5Yr+l5BfsfrnlSDZvFZ+gi/ t8oCGaUdeKt53Z Message-ID: <4D3DEC42.7090608@gmx.net> Date: Mon, 24 Jan 2011 22:16:50 +0100 From: Martin Hilbig User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101230 Lanikai/3.1.7 MIME-Version: 1.0 To: dev@couchdb.apache.org Subject: Document update conflict. and attachments Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 hi, is this a known bug or even my fault? create db: curl -X PUT http://localhost:5984/fail {"ok":true} create doc: curl -vX PUT http://localhost:5984/fail/doc -d '{}' {"ok":true,"id":"doc","rev":"1-967a00dff5e02add41819138abb3284d"} put attachment with nearly correct format ?rev=x-y curl -vX PUT http://localhost:5984/fail/doc/att?rev=12-12345 -d '{}' > PUT /fail/doc/att?rev=12-12345 HTTP/1.1 > User-Agent: curl/7.21.3 (x86_64-unknown-linux-gnu) libcurl/7.21.3 OpenSSL/1.0.0c zlib/1.2.5 > Host: localhost:5984 > Accept: */* > Content-Length: 2 > Content-Type: application/x-www-form-urlencoded > < HTTP/1.1 500 Internal Server Error < Server: CouchDB/1.0.1 (Erlang OTP/R14B) < Date: Mon, 24 Jan 2011 21:08:53 GMT < Content-Type: text/plain;charset=utf-8 < Content-Length: 62 < Cache-Control: must-revalidate < {"error":"{not_found,missing}","reason":"{12,<<\"12345\">>}"} shouldn't look this like: curl -X PUT http://localhost:5984/fail/doc/att?rev=1-967a00dff5e02add41819138abb3284d -d '{}' {"ok":true,"id":"doc","rev":"2-25fb7eb27842ed11617f4e8656600c54"} curl -vX PUT http://localhost:5984/fail/doc/att?rev=1-967a00dff5e02add41819138abb3284d -d '{}' > PUT /fail/doc/att?rev=1-967a00dff5e02add41819138abb3284d HTTP/1.1 > User-Agent: curl/7.21.3 (x86_64-unknown-linux-gnu) libcurl/7.21.3 OpenSSL/1.0.0c zlib/1.2.5 > Host: localhost:5984 > Accept: */* > Content-Length: 2 > Content-Type: application/x-www-form-urlencoded > < HTTP/1.1 409 Conflict < Server: CouchDB/1.0.1 (Erlang OTP/R14B) < Date: Mon, 24 Jan 2011 21:12:04 GMT < Content-Type: text/plain;charset=utf-8 < Content-Length: 58 < Cache-Control: must-revalidate < {"error":"conflict","reason":"Document update conflict."} to sum it up: couchdb only sends a correct 'document update conflict' on attachments, when you give a rev already in the documents history. have fun martin