couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vilya Harvey (JIRA)" <j...@apache.org>
Subject [jira] Created: (COUCHDB-364) Badly formed bulk insert returns an invalid HTTP response
Date Thu, 28 May 2009 20:55:45 GMT
Badly formed bulk insert returns an invalid HTTP response
---------------------------------------------------------

                 Key: COUCHDB-364
                 URL: https://issues.apache.org/jira/browse/COUCHDB-364
             Project: CouchDB
          Issue Type: Bug
          Components: HTTP Interface
    Affects Versions: 0.9
         Environment: Linux 2.6.29.4-162.fc11.x86_64 (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
            Priority: Minor


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.


Mime
View raw message