diff options
author | John Christopher Anderson <jchris@apache.org> | 2010-07-20 01:03:10 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2010-07-20 01:03:10 +0000 |
commit | ae1499d95d5337870da57620130eab79cc0b8490 (patch) | |
tree | 6610d1a22ce1aee10944328232bc2c85f057aa2d /src/couchdb/couch_rep.erl | |
parent | 662bf6812ef0a4fa80cf137761f9b1b5a93821c0 (diff) |
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
Diffstat (limited to 'src/couchdb/couch_rep.erl')
-rw-r--r-- | src/couchdb/couch_rep.erl | 5 |
1 files changed, 3 insertions, 2 deletions
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 |