diff options
author | Robert Newson <robert.newson@cloudant.com> | 2011-06-13 14:59:55 +0100 |
---|---|---|
committer | Robert Newson <robert.newson@cloudant.com> | 2011-06-13 14:59:55 +0100 |
commit | e9a5a6f90a021db1db8a7e55ec797a4c86edcad6 (patch) | |
tree | 06d0c28969cfcf54b2f137e7407b097f73aa0f21 /rel/overlay/share/www/script/couch.js | |
parent | 266ba88ac6ded40087e0211ad9e75e4ce64e66cb (diff) | |
parent | 3c1a0d7e2c9adef4f8b20c9df205a86e5c0feefb (diff) |
Merge CouchDB 1.1
Diffstat (limited to 'rel/overlay/share/www/script/couch.js')
-rw-r--r-- | rel/overlay/share/www/script/couch.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rel/overlay/share/www/script/couch.js b/rel/overlay/share/www/script/couch.js index ca860bd5..6a997cff 100644 --- a/rel/overlay/share/www/script/couch.js +++ b/rel/overlay/share/www/script/couch.js @@ -272,7 +272,7 @@ function CouchDB(name, httpHeaders) { for (var name in options) { if (!options.hasOwnProperty(name)) { continue; }; var value = options[name]; - if (name == "key" || name == "startkey" || name == "endkey") { + if (name == "key" || name == "keys" || name == "startkey" || name == "endkey") { value = toJSON(value); } buf.push(encodeURIComponent(name) + "=" + encodeURIComponent(value)); @@ -402,7 +402,7 @@ CouchDB.request = function(method, uri, options) { options.headers["Content-Type"] = options.headers["Content-Type"] || options.headers["content-type"] || "application/json"; options.headers["Accept"] = options.headers["Accept"] || options.headers["accept"] || "application/json"; var req = CouchDB.newXhr(); - if(uri.substr(0, "http://".length) != "http://") { + if(uri.substr(0, CouchDB.protocol.length) != CouchDB.protocol) { uri = CouchDB.urlPrefix + uri; } req.open(method, uri, false); |