couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1030405 - /couchdb/trunk/src/couchdb/couch_rep_httpc.erl
Date Wed, 03 Nov 2010 10:58:14 GMT
Author: fdmanana
Date: Wed Nov  3 10:58:14 2010
New Revision: 1030405

URL: http://svn.apache.org/viewvc?rev=1030405&view=rev
Log:
Replicator fix: add Content-Length header to the request that creates the remote DB.
Closes COUCHDB-932.
Patch by Dale Harvey. Thanks.


Modified:
    couchdb/trunk/src/couchdb/couch_rep_httpc.erl

Modified: couchdb/trunk/src/couchdb/couch_rep_httpc.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_rep_httpc.erl?rev=1030405&r1=1030404&r2=1030405&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_rep_httpc.erl (original)
+++ couchdb/trunk/src/couchdb/couch_rep_httpc.erl Wed Nov  3 10:58:14 2010
@@ -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



Mime
View raw message