From 2fa06c01c26a6344f36a49979e074ab87b47d883 Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Thu, 14 Oct 2010 10:01:04 +0000 Subject: like in view, check content_type on POST /db/_all_docs git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1022447 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd_db.erl | 1 + 1 file changed, 1 insertion(+) (limited to 'src/couchdb') diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 412b6e99..51f1f55a 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -378,6 +378,7 @@ db_req(#httpd{method='GET',path_parts=[_,<<"_all_docs">>]}=Req, Db) -> 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 -> -- cgit v1.2.3