couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beno...@apache.org
Subject svn commit: r1022447 - /couchdb/trunk/src/couchdb/couch_httpd_db.erl
Date Thu, 14 Oct 2010 10:01:05 GMT
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 ->



Mime
View raw message