From commits-return-5391-apmail-couchdb-commits-archive=couchdb.apache.org@couchdb.apache.org Sun Nov 07 14:49:28 2010 Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 1876 invoked from network); 7 Nov 2010 14:49:28 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Nov 2010 14:49:28 -0000 Received: (qmail 89384 invoked by uid 500); 7 Nov 2010 14:49:59 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 89258 invoked by uid 500); 7 Nov 2010 14:49:57 -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 89248 invoked by uid 99); 7 Nov 2010 14:49:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Nov 2010 14:49:57 +0000 X-ASF-Spam-Status: No, hits=-1996.4 required=10.0 tests=ALL_TRUSTED,FS_REPLICA X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Nov 2010 14:49:55 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 797C623889E0; Sun, 7 Nov 2010 14:48:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1032289 - in /couchdb/branches/new_replicator: share/www/script/test/attachments_multipart.js src/couchdb/couch_httpd_db.erl Date: Sun, 07 Nov 2010 14:48:40 -0000 To: commits@couchdb.apache.org From: fdmanana@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101107144840.797C623889E0@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: fdmanana Date: Sun Nov 7 14:48:40 2010 New Revision: 1032289 URL: http://svn.apache.org/viewvc?rev=1032289&view=rev Log: Merged revision 1032288 from trunk: Allow the atts_since parameter to work together with the open_revs parameter. Modified: couchdb/branches/new_replicator/share/www/script/test/attachments_multipart.js couchdb/branches/new_replicator/src/couchdb/couch_httpd_db.erl Modified: couchdb/branches/new_replicator/share/www/script/test/attachments_multipart.js URL: http://svn.apache.org/viewvc/couchdb/branches/new_replicator/share/www/script/test/attachments_multipart.js?rev=1032289&r1=1032288&r2=1032289&view=diff ============================================================================== --- couchdb/branches/new_replicator/share/www/script/test/attachments_multipart.js (original) +++ couchdb/branches/new_replicator/share/www/script/test/attachments_multipart.js Sun Nov 7 14:48:40 2010 @@ -115,8 +115,11 @@ couchTests.attachments_multipart= functi // now test receiving multipart docs function getBoundary(xhr) { - var ctype = xhr.getResponseHeader("Content-Type"); - + if (xhr instanceof XMLHttpRequest) { + var ctype = xhr.getResponseHeader("Content-Type"); + } else { + var ctype = xhr.headers['Content-Type']; + } var ctypeArgs = ctype.split("; ").slice(1); var boundary = null; for(var i=0; i + Options1; + RevList when is_list(RevList) -> + [{atts_since, RevList}, attachments | Options1] + end, case Revs of [] -> - Options2 = - if AttsSince /= nil -> - [{atts_since, AttsSince}, attachments | Options]; - true -> Options - end, - Doc = couch_doc_open(Db, DocId, Rev, Options2), - send_doc(Req, Doc, Options2); + Doc = couch_doc_open(Db, DocId, Rev, Options), + send_doc(Req, Doc, Options); _ -> {ok, Results} = couch_db:open_doc_revs(Db, DocId, Revs, Options), AcceptedTypes = case couch_httpd:header_value(Req, "Accept") of