diff options
author | Benoit Chesneau <benoitc@apache.org> | 2010-10-14 10:01:04 +0000 |
---|---|---|
committer | Benoit Chesneau <benoitc@apache.org> | 2010-10-14 10:01:04 +0000 |
commit | 2fa06c01c26a6344f36a49979e074ab87b47d883 (patch) | |
tree | 357092a66b9259ae663211b35c53462025b6c9ec | |
parent | 3072bbc46e4d9e0bc2938776c965a5d2e6a15881 (diff) |
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
-rw-r--r-- | src/couchdb/couch_httpd_db.erl | 1 |
1 files changed, 1 insertions, 0 deletions
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 -> |