couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1031279 - /couchdb/branches/1.0.x/src/couchdb/couch_rep.erl
Date Thu, 04 Nov 2010 21:55:17 GMT
Author: fdmanana
Date: Thu Nov  4 21:55:17 2010
New Revision: 1031279

URL: http://svn.apache.org/viewvc?rev=1031279&view=rev
Log:
Merged revision 1031276 from trunk:

Replicator: set Content-Length header when posting to _ensure_full_commit. Same reason as
for COUCHDB-932.

Modified:
    couchdb/branches/1.0.x/src/couchdb/couch_rep.erl

Modified: couchdb/branches/1.0.x/src/couchdb/couch_rep.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/src/couchdb/couch_rep.erl?rev=1031279&r1=1031278&r2=1031279&view=diff
==============================================================================
--- couchdb/branches/1.0.x/src/couchdb/couch_rep.erl (original)
+++ couchdb/branches/1.0.x/src/couchdb/couch_rep.erl Thu Nov  4 21:55:17 2010
@@ -655,10 +655,15 @@ commit_to_both(Source, Target, RequiredS
     {SourceStartTime, TargetStartTime}.
     
 ensure_full_commit(#http_db{headers = Headers} = Target) ->
+    Headers1 = [
+        {"Content-Length", 0} |
+        couch_util:proplist_apply_field(
+            {"Content-Type", "application/json"}, Headers)
+    ],
     Req = Target#http_db{
         resource = "_ensure_full_commit",
         method = post,
-        headers = couch_util:proplist_apply_field({"Content-Type", "application/json"}, Headers)
+        headers = Headers1
     },
     {ResultProps} = couch_rep_httpc:request(Req),
     true = couch_util:get_value(<<"ok">>, ResultProps),
@@ -680,11 +685,16 @@ ensure_full_commit(Target) ->
     end.
 
 ensure_full_commit(#http_db{headers = Headers} = Source, RequiredSeq) ->
+    Headers1 = [
+        {"Content-Length", 0} |
+        couch_util:proplist_apply_field(
+            {"Content-Type", "application/json"}, Headers)
+    ],
     Req = Source#http_db{
         resource = "_ensure_full_commit",
         method = post,
         qs = [{seq, RequiredSeq}],
-        headers = couch_util:proplist_apply_field({"Content-Type", "application/json"}, Headers)
+        headers = Headers1
     },
     {ResultProps} = couch_rep_httpc:request(Req),
     case couch_util:get_value(<<"ok">>, ResultProps) of



Mime
View raw message