diff options
author | Robert Newson <robert.newson@cloudant.com> | 2014-02-13 11:36:12 +0000 |
---|---|---|
committer | Robert Newson <robert.newson@cloudant.com> | 2014-02-13 11:36:12 +0000 |
commit | c6c37945920983d0c2dec01e1cf85398bad58a52 (patch) | |
tree | a5aff7ad0db8c2b54b0b2112f4a9a3b4a7c92bac | |
parent | e54d1d8fc0f36ea737d2693364ee83324a98cddf (diff) | |
parent | e1453abf7d8075906abaf240d8f31465a94b6b25 (diff) | |
download | couchdb-c6c37945920983d0c2dec01e1cf85398bad58a52.tar.gz |
Merge branch '2059-feature-url-len'
-rw-r--r-- | src/couch_replicator/src/couch_replicator_api_wrap.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/couch_replicator/src/couch_replicator_api_wrap.erl b/src/couch_replicator/src/couch_replicator_api_wrap.erl index 52e15b7fa..5a42bb31b 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 -> |