You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2014/02/19 15:48:03 UTC

[06/23] couchdb commit: updated refs/heads/paginate-api-options to 0fca3e9

Revert "Allow runtime configuration of maximum url length in replication"

This reverts commit e1453abf7d8075906abaf240d8f31465a94b6b25.


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

Branch: refs/heads/paginate-api-options
Commit: 90a989ad89db8efbbbfc667086f977ff0a736668
Parents: c6c3794
Author: Robert Newson <rn...@apache.org>
Authored: Thu Feb 13 17:09:00 2014 +0000
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Feb 13 17:09:00 2014 +0000

----------------------------------------------------------------------
 src/couch_replicator/src/couch_replicator_api_wrap.erl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/90a989ad/src/couch_replicator/src/couch_replicator_api_wrap.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator/src/couch_replicator_api_wrap.erl b/src/couch_replicator/src/couch_replicator_api_wrap.erl
index 5a42bb3..52e15b7 100644
--- a/src/couch_replicator/src/couch_replicator_api_wrap.erl
+++ b/src/couch_replicator/src/couch_replicator_api_wrap.erl
@@ -536,11 +536,11 @@ options_to_query_args([{open_revs, Revs} | Rest], Acc) ->
     options_to_query_args(Rest, [{"open_revs", JsonRevs} | Acc]).
 
 
+-define(MAX_URL_LEN, 7000).
+
 atts_since_arg(_UrlLen, [], Acc) ->
     lists:reverse(Acc);
 atts_since_arg(UrlLen, [PA | Rest], Acc) ->
-    MaxUrlLen = list_to_integer(
-        couch_config:get("replicator", "max_url_len", "7000")),
     RevStr = couch_doc:rev_to_str(PA),
     NewUrlLen = case Rest of
     [] ->
@@ -550,7 +550,7 @@ atts_since_arg(UrlLen, [PA | Rest], Acc) ->
         % plus 2 double quotes and a comma (% encoded)
         UrlLen + size(RevStr) + 9
     end,
-    case NewUrlLen >= MaxUrlLen of
+    case NewUrlLen >= ?MAX_URL_LEN of
     true ->
         lists:reverse(Acc);
     false ->