incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: ids starting with " _" disallowed via Futon but not via HTTP doc api ?
Date Fri, 12 Jun 2009 10:38:09 GMT
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<enda.farrell@bbc.co.uk> 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 <jchris@apache.org>
>> wrote:
>>
>>> On Mon, Jun 8, 2009 at 9:07 PM, Nitin Borwankar<nitin@borwankar.com>
>>> 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.

Mime
View raw message