Github user nickva commented on the pull request:
https://github.com/apache/couchdb-chttpd/pull/73#issuecomment-141107520
As another point of reference, I compared behavior with _bulk_docs on 2.0
and it seems to return 400 if at least one key is malformed (which would be
consistent with this pr).
```
$ http -a adm:pass POST http://127.0.0.1:15984/db1/_bulk_docs docs:='[ {
"_id":3 }, { "_id":"4" } ]'
HTTP/1.1 400 Bad Request
Cache-Control: must-revalidate
Content-Length: 64
Content-Type: application/json
Date: Thu, 17 Sep 2015 14:36:19 GMT
Server: CouchDB/b8b9968 (Erlang OTP/17)
X-Couch-Request-ID: 2fd36db438
X-CouchDB-Body-Time: 0
{
"error": "bad_request",
"reason": "Document id must be a string"
}
nvatama@nvm chttpd (master) $ http -a adm:pass POST
http://127.0.0.1:15984/db1/_bulk_docs docs:='[ { "_id":"3" }, { "_id":"4" } ]'
HTTP/1.1 201 Created
Cache-Control: must-revalidate
Content-Length: 130
Content-Type: application/json
Date: Thu, 17 Sep 2015 14:36:56 GMT
Server: CouchDB/b8b9968 (Erlang OTP/17)
X-Couch-Request-ID: 9adef1b5e8
X-CouchDB-Body-Time: 0
[
{
"id": "3",
"ok": true,
"rev": "1-967a00dff5e02add41819138abb3284d"
},
{
"id": "4",
"ok": true,
"rev": "1-967a00dff5e02add41819138abb3284d"
}
]
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---