summaryrefslogtreecommitdiff
path: root/share/www/script/couch.js
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 /share/www/script/couch.js
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 'share/www/script/couch.js')
-rw-r--r--share/www/script/couch.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/share/www/script/couch.js b/share/www/script/couch.js
index dbffa7ce..d745b06e 100644
--- a/share/www/script/couch.js
+++ b/share/www/script/couch.js
@@ -398,6 +398,8 @@ CouchDB.newXhr = function() {
CouchDB.request = function(method, uri, options) {
options = options || {};
+ options.headers = options.headers || {};
+ options.headers["Content-Type"] = options.headers["Content-Type"] || "application/json";
var req = CouchDB.newXhr();
if(uri.substr(0, "http://".length) != "http://") {
uri = CouchDB.urlPrefix + uri