You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2015/11/02 22:13:30 UTC
couch-replicator commit: updated refs/heads/master to 437c657
Repository: couchdb-couch-replicator
Updated Branches:
refs/heads/master 3ce785710 -> 437c6571f
Throw bad request when doc_ids parameter is not an array (or null)
BugzID: 48602
Signed-off-by: Alexander Shorin <kx...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/commit/437c6571
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/437c6571
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/437c6571
Branch: refs/heads/master
Commit: 437c6571fc332802801cdaef4c3c2228fa4fc01e
Parents: 3ce7857
Author: Jay Doane <ja...@gmail.com>
Authored: Mon Jul 13 21:41:18 2015 -0700
Committer: Alexander Shorin <kx...@apache.org>
Committed: Tue Nov 3 00:11:49 2015 +0300
----------------------------------------------------------------------
src/couch_replicator_utils.erl | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/437c6571/src/couch_replicator_utils.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_utils.erl b/src/couch_replicator_utils.erl
index 9fc42df..c10a4e5 100644
--- a/src/couch_replicator_utils.erl
+++ b/src/couch_replicator_utils.erl
@@ -289,6 +289,8 @@ convert_options([{<<"query_params">>, V} | R]) ->
[{query_params, V} | convert_options(R)];
convert_options([{<<"doc_ids">>, null} | R]) ->
convert_options(R);
+convert_options([{<<"doc_ids">>, V} | _R]) when not is_list(V) ->
+ throw({bad_request, <<"parameter `doc_ids` must be an array">>});
convert_options([{<<"doc_ids">>, V} | R]) ->
% Ensure same behaviour as old replicator: accept a list of percent
% encoded doc IDs.