summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-11-03 10:58:48 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-11-03 10:58:48 +0000
commitcb8073a4eb1513fac7c97a2164368e4a684a1cf2 (patch)
treeb7a3a44b4a2ff78ca5a69f196d70d9a204493563
parent4e244a75bf6b352c94a21a131b1ecdcb74e6d3e3 (diff)
Merged revision 1030405 from trunk:
Replicator fix: add Content-Length header to the request that creates the remote DB. Closes COUCHDB-932. Patch by Dale Harvey. Thanks. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@1030406 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/couchdb/couch_rep_httpc.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couchdb/couch_rep_httpc.erl b/src/couchdb/couch_rep_httpc.erl
index 06d4748a..b32e4c77 100644
--- a/src/couchdb/couch_rep_httpc.erl
+++ b/src/couchdb/couch_rep_httpc.erl
@@ -85,7 +85,8 @@ db_exists(Req, CanonicalUrl, CreateDB) ->
end,
case CreateDB of
true ->
- catch ibrowse:send_req(Url, HeadersFun(put), put, [], Options);
+ Headers = [{"Content-Length", 0} | HeadersFun(put)],
+ catch ibrowse:send_req(Url, Headers, put, [], Options);
_Else -> ok
end,
case catch ibrowse:send_req(Url, HeadersFun(head), head, [], Options) of