summaryrefslogtreecommitdiff
path: root/share/www
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2009-04-15 21:21:23 +0000
committerAdam Kocoloski <kocolosk@apache.org>2009-04-15 21:21:23 +0000
commit21fc2ebcbf49cdbc8a81442e50072f5c88e80965 (patch)
tree6b29f73e0b0b623c5f5b090ede25a9c08eefd910 /share/www
parentd4ce197924d255c59d694ba6b2cec23b7c2d05c0 (diff)
URL-encode attachment paths during replication
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@765364 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r--share/www/script/test/replication.js16
1 files changed, 10 insertions, 6 deletions
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")
};
},