couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Joseph Davis (JIRA)" <>
Subject [jira] Resolved: (COUCHDB-364) Badly formed bulk insert returns an invalid HTTP response
Date Thu, 28 May 2009 21:25:45 GMT


Paul Joseph Davis resolved COUCHDB-364.

       Resolution: Duplicate
    Fix Version/s: 0.10
         Assignee: Paul Joseph Davis

Pretty sure this is a duplicate of COUCHDB-306 which is fixed in trunk. If you can reproduce
this on trunk please reopen.

> Badly formed bulk insert returns an invalid HTTP response
> ---------------------------------------------------------
>                 Key: COUCHDB-364
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 0.9
>         Environment: Linux (Fedora 11)
> Erlang (BEAM) emulator version 5.6.5 [source] [64-bit] [smp:4] [async-threads:0] [hipe]
[kernel-poll:false] with OTP R12B
> CouchDB 0.9.0
>            Reporter: Vilya Harvey
>            Assignee: Paul Joseph Davis
>            Priority: Minor
>             Fix For: 0.10
> Trying to do a bulk update via /database/_bulk_docs and passing any unexpected JSON value
as the body (i.e. anything other than a map with the key "docs" containing the list of documents)
causes CouchDB to return an empty response. I guess it should be returning an error message
describing the problem in this case?
> For example, this works correctly and returns the list of inserted documents:
> curl -X POST -d '{ "docs": [{"name": "Fred"}, {"name": "Bruce"}] }' http://localhost:5984/scans/_bulk_docs
> But this fails with the error message as below:
> curl -X POST -d '[{"name": "Fred"}, {"name": "Bruce"}]' http://localhost:5984/scans/_bulk_docs
> curl: (52) Empty reply from server
> (the difference being that the second is just passing through a list of documents, leaving
out the { "docs": ... } wrapper).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message