couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject [34/50] couch commit: updated refs/heads/2971-count-distinct to ee32cd5
Date Wed, 01 Mar 2017 16:39:21 GMT
Return "Bad Request" when count in /_uuids exceeds max


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

Branch: refs/heads/2971-count-distinct
Commit: 8fd7d52093dceb87ac6535dae21a2b006d86018c
Parents: 5d79304
Author: Eric Avdey <eiri@eiri.ca>
Authored: Wed Jan 18 09:55:19 2017 -0400
Committer: Eric Avdey <eiri@eiri.ca>
Committed: Wed Jan 18 10:32:26 2017 -0400

----------------------------------------------------------------------
 src/couch_httpd_misc_handlers.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/8fd7d520/src/couch_httpd_misc_handlers.erl
----------------------------------------------------------------------
diff --git a/src/couch_httpd_misc_handlers.erl b/src/couch_httpd_misc_handlers.erl
index 8d7ce5e..eb75a94 100644
--- a/src/couch_httpd_misc_handlers.erl
+++ b/src/couch_httpd_misc_handlers.erl
@@ -129,7 +129,7 @@ handle_uuids_req(#httpd{method='GET'}=Req) ->
     Max = list_to_integer(config:get("uuids","max_count","1000")),
     Count = try list_to_integer(couch_httpd:qs_value(Req, "count", "1")) of
         N when N > Max ->
-            throw({forbidden, <<"count parameter too large">>});
+            throw({bad_request, <<"count parameter too large">>});
         N when N < 0 ->
             throw({bad_request, <<"count must be a positive integer">>});
         N -> N


Mime
View raw message