summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_rep_reader.erl
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2010-03-05 16:27:00 +0000
committerAdam Kocoloski <kocolosk@apache.org>2010-03-05 16:27:00 +0000
commit64481d0117baba9fce06384addff168912c83546 (patch)
treee945c4dae6663f4c359e179a50baf88d0ad71ef3 /src/couchdb/couch_rep_reader.erl
parent52c9cec5c6715139cf06a99be9779e2f677bceae (diff)
efficient attachment replication. Patch by Filipe Manana. Closes COUCHDB-639
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@919469 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_rep_reader.erl')
-rw-r--r--src/couchdb/couch_rep_reader.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/couchdb/couch_rep_reader.erl b/src/couchdb/couch_rep_reader.erl
index 4f03008f..bd807eab 100644
--- a/src/couchdb/couch_rep_reader.erl
+++ b/src/couchdb/couch_rep_reader.erl
@@ -227,7 +227,7 @@ update_sequence_lists(Seq, State) ->
open_doc_revs(#http_db{} = DbS, DocId, Revs) ->
%% all this logic just splits up revision lists that are too long for
%% MochiWeb into multiple requests
- BaseQS = [{revs,true}, {latest,true}],
+ BaseQS = [{revs,true}, {latest,true}, {att_gzip_length,true}],
BaseReq = DbS#http_db{resource=url_encode(DocId), qs=BaseQS},
BaseLength = length(couch_rep_httpc:full_url(BaseReq)) + 11, % &open_revs=
@@ -250,7 +250,10 @@ open_doc_revs(#http_db{} = DbS, DocId, Revs) ->
open_doc(#http_db{} = DbS, DocId) ->
% get latest rev of the doc
- Req = DbS#http_db{resource=url_encode(DocId)},
+ Req = DbS#http_db{
+ resource=url_encode(DocId),
+ qs=[{att_gzip_length, true}]
+ },
case couch_rep_httpc:request(Req) of
{[{<<"error">>,<<"not_found">>}, {<<"reason">>,<<"missing">>}]} ->
[];