From 21fc2ebcbf49cdbc8a81442e50072f5c88e80965 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Wed, 15 Apr 2009 21:21:23 +0000 Subject: URL-encode attachment paths during replication git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@765364 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/replication.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'share/www/script/test/replication.js') diff --git a/share/www/script/test/replication.js b/share/www/script/test/replication.js index 56698c59..d76d2fd8 100644 --- a/share/www/script/test/replication.js +++ b/share/www/script/test/replication.js @@ -144,7 +144,7 @@ couchTests.replication = function(debug) { dbA.save({ _id:"bin_doc", _attachments:{ - "foo.txt": { + "foo+bar.txt": { "type":"base64", "data": "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=" } @@ -154,7 +154,7 @@ couchTests.replication = function(debug) { dbA.save({ _id:"_design/with_bin", _attachments:{ - "foo.txt": { + "foo+bar.txt": { "type":"base64", "data": "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=" } @@ -163,17 +163,21 @@ couchTests.replication = function(debug) { }; 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") }; }, -- cgit v1.2.3