Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 64217 invoked from network); 13 Apr 2011 16:37:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Apr 2011 16:37:45 -0000 Received: (qmail 86987 invoked by uid 500); 13 Apr 2011 16:37:44 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 86951 invoked by uid 500); 13 Apr 2011 16:37:44 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 86943 invoked by uid 99); 13 Apr 2011 16:37:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Apr 2011 16:37:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Apr 2011 16:37:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 18BD8A0EF2 for ; Wed, 13 Apr 2011 16:37:06 +0000 (UTC) Date: Wed, 13 Apr 2011 16:37:06 +0000 (UTC) From: "Dipesh Patel (JIRA)" To: dev@couchdb.apache.org Message-ID: <1559398247.55530.1302712626098.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (COUCHDB-910) Malformed _bulk_docs post data causes a 500 function clause error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dipesh Patel updated COUCHDB-910: --------------------------------- Attachment: patch.txt My first stab at this. Let me know if there are any problems. Can also find it here: https://github.com/dipthegeezer/couchdb/tree/910_bulk_docs-post-data-validation > Malformed _bulk_docs post data causes a 500 function clause error > ----------------------------------------------------------------- > > Key: COUCHDB-910 > URL: https://issues.apache.org/jira/browse/COUCHDB-910 > Project: CouchDB > Issue Type: Bug > Components: HTTP Interface > Affects Versions: 1.0 > Environment: Cloudant BigCouch EC2 node > Reporter: Jay Nelson > Priority: Minor > Attachments: patch.txt > > Original Estimate: 48h > Remaining Estimate: 48h > > The following two malformed _bulk_docs request result in errors when issued to Cloudant's BigNode cluster (however, it is fundamentally a CouchDB problem and should give the same results with a standalone CouchDB): > curl -d '{"doc": [] }' -H 'Content-Type:application/json' -X POST https://appadvice.cloudant.com/foo/_bulk_docs > {"error":"unknown_error","reason":"function_clause"} > curl -d '{"doc": [{"_id":"foo"}] }' -H 'Content-Type:application/json' -X POST https://appadvice.cloudant.com/foo/_bulk_docs > {"error":"unknown_error","reason":"function_clause"} > In both cases the error is that {"docs": [ ... ] } was not used but instead the keyword "doc" was used. > The result should be a notification of the error in the data supplied, rather than crashing the web server. > This is probably a reopening of issues related to COUCHDB-306 -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira