I am using CouchDBx 0.9 on my Mac - 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
[email protected]


On Mon, Jun 8, 2009 at 11:17 PM, Chris Anderson <[email protected]> wrote:

> On Mon, Jun 8, 2009 at 9:07 PM, Nitin Borwankar<[email protected]>
> 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:[email protected]: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
> > [email protected]
> >
>
>
>
> --
> Chris Anderson
> http://jchrisa.net
> http://couch.io
>

Reply via email to