You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2009/04/16 00:01:31 UTC
svn commit: r765387 - in /couchdb/branches/0.9.x:
share/www/script/test/replication.js src/couchdb/couch_rep.erl
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),