diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2010-11-03 10:58:14 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2010-11-03 10:58:14 +0000 |
commit | baf96311321105383f186e5c149f6be3958c685b (patch) | |
tree | 46150725a9b2200613c2a7a58aaaa5081a7ba651 | |
parent | 871e2617e32fb305b9a4e16e560e270a7ef84ffc (diff) |
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/trunk@1030405 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/couchdb/couch_rep_httpc.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couchdb/couch_rep_httpc.erl b/src/couchdb/couch_rep_httpc.erl index 662b1592..75bc5cc7 100644 --- a/src/couchdb/couch_rep_httpc.erl +++ b/src/couchdb/couch_rep_httpc.erl @@ -87,7 +87,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 |