Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 11659 invoked from network); 25 Aug 2009 09:40:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Aug 2009 09:40:08 -0000 Received: (qmail 3541 invoked by uid 500); 25 Aug 2009 09:40:32 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 3475 invoked by uid 500); 25 Aug 2009 09:40:32 -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 3465 invoked by uid 99); 25 Aug 2009 09:40:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2009 09:40:31 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FB_WORD1_END_DOLLAR,NORMAL_HTTP_TO_IP,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of francisco.treacy@gmail.com designates 209.85.218.211 as permitted sender) Received: from [209.85.218.211] (HELO mail-bw0-f211.google.com) (209.85.218.211) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2009 09:40:19 +0000 Received: by bwz7 with SMTP id 7so2480487bwz.11 for ; Tue, 25 Aug 2009 02:39:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=0VkwrtCgaBXHkJOuTk/YBcRMpIyWVLS1H80ySC8Bm/A=; b=BPtfkvx1Cfyt+sjv9MrqhIUUZgy35ymAJrOvCUo+r0VRB5SkqmWEjIc+XspQJmp8zo /MzytBq98x0Iz6BwO6E0sPgEUVtg4m1xA6fPQzCznQXz+v6PS5k8khnJuFhdAB90DRRD i6mxAosIAm7sGkuqQW58FdpjjR8YFaL9LkX2o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Lhb95eAFGUyzVeZEysmE6Y+/GcmUPJn84QG8oQzrZc19gJS+rzWO484o99m95jKdz6 kl7AFUNDkv+7TwyyoJr4OtrgxvVIOEMbWa94THWSL5ivszHNyDMICtmzqOuU3ubpaTNd tLI6N1aPE+5lvYFcChetzSEocHiPnA9ydr7+A= MIME-Version: 1.0 Received: by 10.204.141.21 with SMTP id k21mr2294917bku.124.1251193199444; Tue, 25 Aug 2009 02:39:59 -0700 (PDT) In-Reply-To: References: <921000906082107g6b74570fo80dfdd6521f15603@mail.gmail.com> <921000906082341t3bc1b35em94a4d0ee1e4018f3@mail.gmail.com> <8F6A0A6C-01E8-4A6B-A60A-BADC4955B191@apache.org> <4A322C6B.8060602@bbc.co.uk> Date: Tue, 25 Aug 2009 11:39:59 +0200 Message-ID: <41c8480f0908250239j74bfc114u65b54a255ecc5c78@mail.gmail.com> Subject: Re: ids starting with " _" disallowed via Futon but not via HTTP doc api ? From: francisco treacy To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi all, I'm afraid I don't understand what is the current state of handling underscore on keys. When I PUT documents containing a key that starts with an underscore... it works fine for me on CouchDB 0.9. {"_id":"_design/surf","_rev":"1-455975032","_type": "mytype" } However apparently for other people this does not, at least not on CouchDB 0.9.1: Response while PUTting: HTTP 500: {"error":"doc_validation","reason":"Bad special document member: _type"} Has it been changed at some point in 0.9? Does it have something to do with the fact that the document is a design doc? Any other insights? Thanks, Francisco 2009/6/12 Paul Davis : > Enda, > > I'd need to know what versions of CouchDB you were using to be sure, > but my guess is that the '_' inconsistency was our fault. For awhile > there we managed to have it so only '_' members with an integer value > were being caught. > > Paul > > On Fri, Jun 12, 2009 at 6:22 AM, Enda Farrell wrote: >> We found, can't remember if it was an 0.8 or a 0.9 that - while you >> can/could create keys starting with an _underscore, the replication module >> wouldn't replicate databases with such keys. Even after you deleted them. >> >> Jan Lehnardt wrote: >> >> On 9 Jun 2009, at 07:41, Nitin Borwankar wrote: >> >>> I am using CouchDBx 0.9 on my Mac - >> >> I believe the _-enforcement is a trunk-only feature at this point. >> CouchDBX will catch up once 0.10 is released (or if you compile >> the core* yourself). >> >> * http://github.com/janl/couchdbx-core/tree/master >> >> Cheers >> Jan >> >> >>> strangely enough Futon blocks it but the >>> HTTP API lets it in - does Futon separately vaidate for the '_' ? >>> >>> Nitin >>> >>> 37% of all statistics are made up on the spot >>> >>> ------------------------------------------------------------------------------------- >>> Nitin Borwankar >>> nborwankar@gmail.com >>> >>> >>> On Mon, Jun 8, 2009 at 11:17 PM, Chris Anderson >>> wrote: >>> >>>> On Mon, Jun 8, 2009 at 9:07 PM, Nitin Borwankar >>>> wrote: >>>>> Futon complains when I try to create a doc with id "_abc" but via >>>>> curl no >>>>> problem. >>>>> >>>>> NitinBorwankarsComputer:~ nitin$ curl -X PUT >>>>> http://127.0.0.1:5984/test/_abc-H "Content-Type: application/json" >>>>> -d >>>>> {} >>>>> {"ok":true,"id":"_abc","rev":"1-3856470053"} >>>>> >>>>> NitinBorwankarsComputer:~ nitin$ curl -X GET >>>> http://127.0.0.1:5984/test/_abc >>>>> >>>>> {"_id":"_abc","_rev":"1-3856470053"} >>>> >>>> Hmm. I'm not sure. You should never be able to create _prefixed doc >>>> ids unless they are _design or _local. >>>> >>>> On trunk I get: >>>> >>>> $ curl -X PUT http://jchris:animal@127.0.0.1:5984/test/_foo -d {} >>>> {"error":"bad_request","reason":"Only reserved document ids may start >>>> with underscore."} >>>> >>>> Which is what you ought to get. I guess this must have been fixed >>>> since the version you are using. >>>> >>>>> >>>>> So what's happening here - is Futon enforcing some future rule and >>>>> HTTP >>>> API >>>>> not there yet or ....? >>>>> >>>>> Nitin >>>>> >>>>> >>>>> 37% of all statistics are made up on the spot >>>>> >>>> >>>> ------------------------------------------------------------------------------------- >>>>> Nitin Borwankar >>>>> nborwankar@gmail.com >>>>> >>>> >>>> >>>> >>>> -- >>>> Chris Anderson >>>> http://jchrisa.net >>>> http://couch.io >>>> >> >> >> http://www.bbc.co.uk >> This e-mail (and any attachments) is confidential and may contain personal >> views which are not the views of the BBC unless specifically stated. >> If you have received it in error, please delete it from your system. >> Do not use, copy or disclose the information in any way nor act in reliance >> on it and notify the sender immediately. >> Please note that the BBC monitors e-mails sent or received. >> Further communication will signify your consent to this. >