couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Bisbee (Closed) (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (COUCHDB-364) Badly formed bulk insert returns an invalid HTTP response
Date Wed, 22 Feb 2012 05:12:50 GMT

     [ https://issues.apache.org/jira/browse/COUCHDB-364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sam Bisbee closed COUCHDB-364.
------------------------------


No follow up from reporter. Closing.
                
> 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
>            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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message