Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 85701 invoked from network); 28 Apr 2009 17:09:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Apr 2009 17:09:59 -0000 Received: (qmail 78469 invoked by uid 500); 28 Apr 2009 17:09:59 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 78392 invoked by uid 500); 28 Apr 2009 17:09:59 -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 78380 invoked by uid 99); 28 Apr 2009 17:09:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2009 17:09:59 +0000 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,NORMAL_HTTP_TO_IP,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2009 17:09:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7887A234C003 for ; Tue, 28 Apr 2009 10:09:30 -0700 (PDT) Message-ID: <145972406.1240938570489.JavaMail.jira@brutus> Date: Tue, 28 Apr 2009 10:09:30 -0700 (PDT) From: "Paul Joseph Davis (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Commented: (COUCHDB-335) More 500 errors for malformed client requests In-Reply-To: <52709021.1240905751652.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703743#action_12703743 ] Paul Joseph Davis commented on COUCHDB-335: ------------------------------------------- Thanks for the reports. Would it be possible for you to generate a test suite patch so that I don't make more mistakes when translating the curl errors? I'm at a conference and I can't commit a whole bunch of time to this but failing tests would be helpful to make sure that I'm fixing exactly what you've found. > More 500 errors for malformed client requests > --------------------------------------------- > > Key: COUCHDB-335 > URL: https://issues.apache.org/jira/browse/COUCHDB-335 > Project: CouchDB > Issue Type: Improvement > Components: HTTP Interface > Environment: SVN trunk "0.10.0a768591" > Reporter: Brian Candler > Priority: Minor > > Here are four more cases where malformed client requests can return "500 Internal Server Error" (as shown by curl -v) with an unhelpful diagnostic message. > $ curl -X PUT http://127.0.0.1:5984/test > {"ok":true} > $ curl -X POST -d '{"docs":[1,2,3]}' http://127.0.0.1:5984/test/_bulk_docs > {"error":"unknown_error","reason":"function_clause"} > ### 500 Internal Server Error > $ curl -X POST -d '{"docs":{"foo":"bar"}}' http://127.0.0.1:5984/test/_bulk_docs > {"error":"unknown_error","reason":"function_clause"} > ### 500 Internal Server Error > $ curl -X POST -d '[]' -H 'Content-Type: application/json' http://127.0.0.1:5984/test/_temp_view > {"error":"badmatch","reason":""} > ### 500 Internal Server Error > $ curl -X POST -d '{}' -H 'Content-Type: application/json' http://127.0.0.1:5984/test/_temp_view > {"error":"badmatch","reason":"{{nocatch,{compilation_error,<<\"expression does not eval to a function. (undefined)\">>}},\n [{couch_os_process,prompt,2},\n {couch_query_servers,'-start_doc_map/2-fun-0-',2},\n {lists,foreach,2},\n {couch_query_servers,start_doc_map,2},\n {couch_view_updater,view_compute,2},\n {couch_view_updater,update,1}]}"} > ### 500 Internal Server Error > See also COUCHDB-320 which gives another way to elicit a 500: > curl -X POST -d '{"map":"function(){}"}' http://127.0.0.1:5984/test/_temp_view > {"error":"incorrect_mime_type","reason":"application/x-www-form-urlencoded"} > ### 500 Internal Server Error -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.