couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject couch commit: updated refs/heads/master to e858e7d
Date Wed, 08 Jul 2015 22:48:25 GMT
Repository: couchdb-couch
Updated Branches:
  refs/heads/master f29e590c0 -> e858e7dfe


Throw bad request for empty POST request body when filtering by doc_ids

JIRA: COUCHDB-2743
BugzID: 48864


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/e858e7df
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/e858e7df
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/e858e7df

Branch: refs/heads/master
Commit: e858e7dfef06a4d6e6c9228de80628f7166397ef
Parents: f29e590
Author: Jay Doane <jay.s.doane@gmail.com>
Authored: Wed Jul 8 15:23:39 2015 -0700
Committer: Jay Doane <jay.s.doane@gmail.com>
Committed: Wed Jul 8 15:23:39 2015 -0700

----------------------------------------------------------------------
 src/couch_changes.erl | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/e858e7df/src/couch_changes.erl
----------------------------------------------------------------------
diff --git a/src/couch_changes.erl b/src/couch_changes.erl
index 2b2647f..33e7c14 100644
--- a/src/couch_changes.erl
+++ b/src/couch_changes.erl
@@ -309,6 +309,10 @@ get_view_qs(Req) ->
 
 get_doc_ids({json_req, {Props}}) ->
     check_docids(couch_util:get_value(<<"doc_ids">>, Props));
+get_doc_ids(#httpd{method='POST', req_body=undefined}) ->
+    throw({bad_request,
+           "`_doc_ids` filter requires JSON object body with field \"doc_ids\" "
+           "containing array of ids."});
 get_doc_ids(#httpd{method='POST'}=Req) ->
     {Props} = couch_httpd:json_body_obj(Req),
     check_docids(couch_util:get_value(<<"doc_ids">>, Props));


Mime
View raw message