From ae1499d95d5337870da57620130eab79cc0b8490 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Tue, 20 Jul 2010 01:03:10 +0000 Subject: require application/json content-type in the remaining places where a POST has side-effects git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@965700 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_rep.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/couchdb/couch_rep.erl') diff --git a/src/couchdb/couch_rep.erl b/src/couchdb/couch_rep.erl index 1e36f58e..07ee8416 100644 --- a/src/couchdb/couch_rep.erl +++ b/src/couchdb/couch_rep.erl @@ -696,8 +696,9 @@ ensure_full_commit(#http_db{headers = Headers} = Target) -> Req = Target#http_db{ resource = "_ensure_full_commit", method = post, - headers = [{"content-type", "application/json"} | Headers] + headers = couch_util:proplist_apply_field({"Content-Type", "application/json"}, Headers) }, + ?LOG_ERROR("Req ~p",[Req]), {ResultProps} = couch_rep_httpc:request(Req), true = couch_util:get_value(<<"ok">>, ResultProps), couch_util:get_value(<<"instance_start_time">>, ResultProps); @@ -722,7 +723,7 @@ ensure_full_commit(#http_db{headers = Headers} = Source, RequiredSeq) -> resource = "_ensure_full_commit", method = post, qs = [{seq, RequiredSeq}], - headers = [{"content-type", "application/json"} | Headers] + headers = couch_util:proplist_apply_field({"Content-Type", "application/json"}, Headers) }, {ResultProps} = couch_rep_httpc:request(Req), case couch_util:get_value(<<"ok">>, ResultProps) of -- cgit v1.2.3