Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 77D7E105E0 for ; Tue, 1 Apr 2014 08:53:43 +0000 (UTC) Received: (qmail 22604 invoked by uid 500); 1 Apr 2014 08:52:40 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 22065 invoked by uid 500); 1 Apr 2014 08:52:24 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 21305 invoked by uid 99); 1 Apr 2014 08:52:07 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2014 08:52:07 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id E6DE491B1D9; Tue, 1 Apr 2014 08:52:06 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kxepal@apache.org To: commits@couchdb.apache.org Date: Tue, 01 Apr 2014 08:52:21 -0000 Message-Id: In-Reply-To: <9b1fa52a5b7c4e23a6ef348e7963b27c@git.apache.org> References: <9b1fa52a5b7c4e23a6ef348e7963b27c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [16/50] jquery-couch commit: updated refs/heads/import-master to 66dbcbf Fix some bugs in jquery.couch.js. Namely: * openDoc() was inadvertently adding a ?beforeSuccess=... parameter to the URL. * bulkSave() wasn't sending a POST body. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@949028 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/commit/694e7332 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/tree/694e7332 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/diff/694e7332 Branch: refs/heads/import-master Commit: 694e7332e95dc2056691e19a4b538b0b8e5a4aff Parents: 7bffaf2 Author: Jason David Davies Authored: Thu May 27 22:37:58 2010 +0000 Committer: Alexander Shorin Committed: Thu May 27 22:37:58 2010 +0000 ---------------------------------------------------------------------- jquery.couch.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/blob/694e7332/jquery.couch.js ---------------------------------------------------------------------- diff --git a/jquery.couch.js b/jquery.couch.js index b2c8e4a..99d97f5 100644 --- a/jquery.couch.js +++ b/jquery.couch.js @@ -271,7 +271,7 @@ openDoc: function(docId, options, ajaxOptions) { options = options || {}; if (db_opts.attachPrevRev || options.attachPrevRev) { - $.extend(options, { + $.extend(ajaxOptions, { beforeSuccess : function(req, doc) { rawDocs[doc._id] = { rev : doc._rev, @@ -280,7 +280,7 @@ } }); } else { - $.extend(options, { + $.extend(ajaxOptions, { beforeSuccess : function(req, doc) { if (doc["jquery.couch.attachPrevRev"]) { rawDocs[doc._id] = { @@ -344,7 +344,7 @@ ajax({ type: "POST", url: this.uri + "_bulk_docs" + encodeOptions(options), - data: toJSON(docs) + contentType: "application/json", data: toJSON(docs) }, options, "The documents could not be saved"