diff options
author | John Christopher Anderson <jchris@apache.org> | 2009-02-13 17:58:03 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2009-02-13 17:58:03 +0000 |
commit | 9b2e6ed37184709e70def81d53246a9fe58f18ba (patch) | |
tree | 51845c12d72b3b8ec3af10f01171d03ebd1050ee /src | |
parent | 76508853716f2c0567bb08dfb586a6f326ee54e2 (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')
-rw-r--r-- | src/couchdb/couch_rep.erl | 8 |
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} -> |