summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbenoitc <benoitc@apache.org>2014-01-05 09:28:55 +0100
committerbenoitc <benoitc@apache.org>2014-01-05 09:54:15 +0100
commit88b11dbaa450b670bd43674fc76e9d5032b3978b (patch)
treea6c57ae256e6de8f56df1fc094abda8b6572c2d2
parentf2b2f794c03aeacfad032bc0e6cb7f98b122df17 (diff)
downloadcouchdb-88b11dbaa450b670bd43674fc76e9d5032b3978b.tar.gz
descriptive name for the maximum number of dbs returned.
-rw-r--r--src/couchdb/couch_httpd_misc_handlers.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/couchdb/couch_httpd_misc_handlers.erl b/src/couchdb/couch_httpd_misc_handlers.erl
index 0d7fb2b53..30ad48886 100644
--- a/src/couchdb/couch_httpd_misc_handlers.erl
+++ b/src/couchdb/couch_httpd_misc_handlers.erl
@@ -28,7 +28,7 @@
start_chunked_response/3, send_error/4]).
--define(DEFAULT_LIMIT, 16#10000000).
+-define(MAX_DBS, 16#10000000).
% httpd global handlers
@@ -84,7 +84,7 @@ handle_utils_dir_req(Req, _) ->
handle_all_dbs_req(#httpd{method='GET'}=Req) ->
Limit0 = couch_util:to_integer(couch_httpd:qs_value(Req, "limit",
- ?DEFAULT_LIMIT)),
+ ?MAX_DBS)),
Skip0 = couch_util:to_integer(couch_httpd:qs_value(Req, "skip", -1)),
{ok, {DbNames, _, _}} = couch_server:all_databases(fun all_dbs_fun/2,
{[], Skip0, Limit0}),
@@ -93,7 +93,7 @@ handle_all_dbs_req(Req) ->
send_method_not_allowed(Req, "GET,HEAD").
-all_dbs_fun(DbName, {Acc, Skip, 0}) ->
+all_dbs_fun(_DbName, {Acc, Skip, 0}) ->
{stop, {Acc, Skip, 0}};
all_dbs_fun(DbName, {Acc, 0, Limit}) ->
{ok, {[DbName | Acc], 0, Limit - 1}};