summaryrefslogtreecommitdiff
path: root/src/couchdb
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-02-13 17:58:03 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-02-13 17:58:03 +0000
commit9b2e6ed37184709e70def81d53246a9fe58f18ba (patch)
tree51845c12d72b3b8ec3af10f01171d03ebd1050ee /src/couchdb
parent76508853716f2c0567bb08dfb586a6f326ee54e2 (diff)
fix COUCHDB-253. Replicator should not use chunked transfer-encoding on GET requests. thanks Adam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@744193 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-rw-r--r--src/couchdb/couch_rep.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/couchdb/couch_rep.erl b/src/couchdb/couch_rep.erl
index 0e7c1012..e0c4d470 100644
--- a/src/couchdb/couch_rep.erl
+++ b/src/couchdb/couch_rep.erl
@@ -182,10 +182,12 @@ do_http_request(Url, Action, Headers, JsonBody, Retries) ->
_ ->
iolist_to_binary(?JSON_ENCODE(JsonBody))
end,
- Options = [
+ Options = case Action of
+ get -> [];
+ _ -> [{transfer_encoding, {chunked, 65535}}]
+ end ++ [
{content_type, "application/json; charset=utf-8"},
- {max_pipeline_size, 101},
- {transfer_encoding, {chunked, 65535}}
+ {max_pipeline_size, 101}
],
case ibrowse:send_req(Url, Headers, Action, Body, Options) of
{ok, Status, ResponseHeaders, ResponseBody} ->