summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_rep_writer.erl
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2010-06-24 05:21:30 +0000
committerJohn Christopher Anderson <jchris@apache.org>2010-06-24 05:21:30 +0000
commit4b079e27429567b520abf091a8c0da84885c0d80 (patch)
tree7b75b92e6099b19b442dec35d198459f201da419 /src/couchdb/couch_rep_writer.erl
parenta96cc93949fd8cf4bd91ce2fa49bb32b93a7de32 (diff)
use JSON content type in replicator, require it in the _bulk_docs and other POST apis
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@957422 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_rep_writer.erl')
-rw-r--r--src/couchdb/couch_rep_writer.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couchdb/couch_rep_writer.erl b/src/couchdb/couch_rep_writer.erl
index cdbbbee0..16fc1902 100644
--- a/src/couchdb/couch_rep_writer.erl
+++ b/src/couchdb/couch_rep_writer.erl
@@ -76,8 +76,9 @@ write_bulk_docs(#http_db{headers = Headers} = Db, Docs) ->
resource = "_bulk_docs",
method = post,
body = {[{new_edits, false}, {docs, JsonDocs}]},
- headers = [{"x-couch-full-commit", "false"} | Headers]
+ headers = couch_util:proplist_apply_field({"Content-Type", "application/json"}, [{"X-Couch-Full-Commit", "false"} | Headers])
},
+ ?LOG_ERROR("headers ~p",[Request#http_db.headers]),
ErrorsJson = case couch_rep_httpc:request(Request) of
{FailProps} ->
exit({target_error, couch_util:get_value(<<"error">>, FailProps)});