You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by dc...@apache.org on 2014/03/07 01:18:00 UTC

[17/50] [abbrv] couchdb commit: updated refs/heads/2041-update-ibrowse to 948e7d9

Allow runtime configuration of maximum url length in replication

COUCHDB-2059


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

Branch: refs/heads/2041-update-ibrowse
Commit: e1453abf7d8075906abaf240d8f31465a94b6b25
Parents: 72adab9
Author: Robert Newson <ro...@cloudant.com>
Authored: Thu Feb 13 10:20:17 2014 +0000
Committer: Robert Newson <ro...@cloudant.com>
Committed: Thu Feb 13 10:20:17 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/e1453abf/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 52e15b7..5a42bb3 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 >= ?MAX_URL_LEN of
+    case NewUrlLen >= MaxUrlLen of
     true ->
         lists:reverse(Acc);
     false ->