Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 89958 invoked from network); 15 Apr 2009 22:01:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Apr 2009 22:01:54 -0000 Received: (qmail 164 invoked by uid 500); 15 Apr 2009 22:01:54 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 99978 invoked by uid 500); 15 Apr 2009 22:01:54 -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 99969 invoked by uid 99); 15 Apr 2009 22:01:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Apr 2009 22:01:54 +0000 X-ASF-Spam-Status: No, hits=-1998.8 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; Wed, 15 Apr 2009 22:01:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 225742388A23; Wed, 15 Apr 2009 22:01:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r765387 - in /couchdb/branches/0.9.x: share/www/script/test/replication.js src/couchdb/couch_rep.erl Date: Wed, 15 Apr 2009 22:01:31 -0000 To: commits@couchdb.apache.org From: kocolosk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090415220131.225742388A23@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kocolosk Date: Wed Apr 15 22:01:30 2009 New Revision: 765387 URL: http://svn.apache.org/viewvc?rev=765387&view=rev Log: merged r765364 from trunk Modified: couchdb/branches/0.9.x/share/www/script/test/replication.js couchdb/branches/0.9.x/src/couchdb/couch_rep.erl Modified: couchdb/branches/0.9.x/share/www/script/test/replication.js URL: http://svn.apache.org/viewvc/couchdb/branches/0.9.x/share/www/script/test/replication.js?rev=765387&r1=765386&r2=765387&view=diff ============================================================================== --- couchdb/branches/0.9.x/share/www/script/test/replication.js (original) +++ couchdb/branches/0.9.x/share/www/script/test/replication.js Wed Apr 15 22:01:30 2009 @@ -144,7 +144,7 @@ dbA.save({ _id:"bin_doc", _attachments:{ - "foo.txt": { + "foo+bar.txt": { "type":"base64", "data": "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=" } @@ -154,7 +154,7 @@ dbA.save({ _id:"_design/with_bin", _attachments:{ - "foo.txt": { + "foo+bar.txt": { "type":"base64", "data": "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=" } @@ -163,17 +163,21 @@ }; this.afterAB1 = function(dbA, dbB) { - var xhr = CouchDB.request("GET", "/test_suite_db_a/bin_doc/foo.txt"); + var xhr = CouchDB.request("GET", + "/test_suite_db_a/bin_doc/foo%2Bbar.txt"); T(xhr.responseText == "This is a base64 encoded text") - xhr = CouchDB.request("GET", "/test_suite_db_b/bin_doc/foo.txt"); + xhr = CouchDB.request("GET", + "/test_suite_db_b/bin_doc/foo%2Bbar.txt"); T(xhr.responseText == "This is a base64 encoded text") // and the design-doc - xhr = CouchDB.request("GET", "/test_suite_db_a/_design/with_bin/foo.txt"); + xhr = CouchDB.request("GET", + "/test_suite_db_a/_design/with_bin/foo%2Bbar.txt"); T(xhr.responseText == "This is a base64 encoded text") - xhr = CouchDB.request("GET", "/test_suite_db_b/_design/with_bin/foo.txt"); + xhr = CouchDB.request("GET", + "/test_suite_db_b/_design/with_bin/foo%2Bbar.txt"); T(xhr.responseText == "This is a base64 encoded text") }; }, Modified: couchdb/branches/0.9.x/src/couchdb/couch_rep.erl URL: http://svn.apache.org/viewvc/couchdb/branches/0.9.x/src/couchdb/couch_rep.erl?rev=765387&r1=765386&r2=765387&view=diff ============================================================================== --- couchdb/branches/0.9.x/src/couchdb/couch_rep.erl (original) +++ couchdb/branches/0.9.x/src/couchdb/couch_rep.erl Wed Apr 15 22:01:30 2009 @@ -372,7 +372,7 @@ attachment_stub_converter(DbS, Id, {Name, {stub, Type, Length}}) -> #http_db{uri=DbUrl, headers=Headers} = DbS, % TODO worry about revisions - Url = DbUrl ++ url_encode(Id) ++ "/" ++ ?b2l(Name), + Url = DbUrl ++ url_encode(Id) ++ "/" ++ url_encode(?b2l(Name)), ?LOG_DEBUG("Attachment URL ~p", [Url]), {ok, RcvFun} = make_attachment_stub_receiver(Url, Headers, Name, Type, Length),