couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Bisbee (Closed) (JIRA)" <>
Subject [jira] [Closed] (COUCHDB-332) Reject documents whose ids start with underscore
Date Wed, 22 Feb 2012 05:04:49 GMT


Sam Bisbee closed COUCHDB-332.

Resolved for a while. Closing.
> Reject documents whose ids start with underscore
> ------------------------------------------------
>                 Key: COUCHDB-332
>                 URL:
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: HTTP Interface
>         Environment: 0.10.0a767851
>            Reporter: Brian Candler
>            Assignee: Paul Joseph Davis
>            Priority: Minor
>             Fix For: 0.10
> docids which start with underscore are reserved for CouchDB. I believe they should be
rejected to avoid confusion.
> Currently observed behaviour:
> (1) an attempt to PUT to /db/_docid succeeds, and creates a document whose ID starts
with an underscore
> $ curl -X PUT -d "{}"
> {"ok":true,"id":"_xxx","rev":"1-1751372641"}
> (2) a POST to /db/_docid tries to do something and fails; possibly it could succeed given
the right headers and body.
> $ curl -X POST -d "{}"
> {"error":"bad_content_type","reason":"Invalid Content-Type header for form upload"}
> -- status line show 415 Unsupported Media Type
> This means that typos can result in confusing error messages; for example, a POST to
/db/_tmp_view instead of /db/_temp_view. IMO it would be cleaner first to test the docid and
reject it on that basis.
> (Sorry, I am not including a test suite submission. It will be much easier for someone
who already knows their way around the rather large set of private libraries which the test
suite contains. I currently use Ruby to talk to CouchDB, not ECMAscript)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message