Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 59037 invoked from network); 14 Oct 2010 10:02:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Oct 2010 10:02:07 -0000 Received: (qmail 24501 invoked by uid 500); 14 Oct 2010 10:02:07 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 24367 invoked by uid 500); 14 Oct 2010 10:02:05 -0000 Mailing-List: contact commits-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 commits@couchdb.apache.org Received: (qmail 24360 invoked by uid 99); 14 Oct 2010 10:02:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Oct 2010 10:02:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Oct 2010 10:02:01 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 394B523889ED; Thu, 14 Oct 2010 10:01:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1022447 - /couchdb/trunk/src/couchdb/couch_httpd_db.erl Date: Thu, 14 Oct 2010 10:01:05 -0000 To: commits@couchdb.apache.org From: benoitc@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101014100105.394B523889ED@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: benoitc Date: Thu Oct 14 10:01:04 2010 New Revision: 1022447 URL: http://svn.apache.org/viewvc?rev=1022447&view=rev Log: like in view, check content_type on POST /db/_all_docs Modified: couchdb/trunk/src/couchdb/couch_httpd_db.erl Modified: couchdb/trunk/src/couchdb/couch_httpd_db.erl URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_db.erl?rev=1022447&r1=1022446&r2=1022447&view=diff ============================================================================== --- couchdb/trunk/src/couchdb/couch_httpd_db.erl (original) +++ couchdb/trunk/src/couchdb/couch_httpd_db.erl Thu Oct 14 10:01:04 2010 @@ -378,6 +378,7 @@ db_req(#httpd{method='GET',path_parts=[_ all_docs_view(Req, Db, nil); db_req(#httpd{method='POST',path_parts=[_,<<"_all_docs">>]}=Req, Db) -> + couch_httpd:validate_ctype(Req, "application/json"), {Fields} = couch_httpd:json_body_obj(Req), case couch_util:get_value(<<"keys">>, Fields, nil) of nil ->