summaryrefslogtreecommitdiff
path: root/share/www
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2009-05-04 22:25:23 +0000
committerAdam Kocoloski <kocolosk@apache.org>2009-05-04 22:25:23 +0000
commitba94c9c5c85c82804faa91d8d2938539168ea965 (patch)
tree38908c2b1c37617a160aa905f7c466a20b0055df /share/www
parent4708e0afcfeaaa9821c9910902495972fc5733ac (diff)
standalone attachment GETs should respect "rev" qs param
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@771474 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r--share/www/script/test/attachments.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/share/www/script/test/attachments.js b/share/www/script/test/attachments.js
index d9560bce..ec59eda4 100644
--- a/share/www/script/test/attachments.js
+++ b/share/www/script/test/attachments.js
@@ -117,9 +117,15 @@ couchTests.attachments= function(debug) {
var xhr = CouchDB.request("DELETE", "/test_suite_db/bin_doc3/attachment.txt?rev=" + rev);
T(xhr.status == 200);
- var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc3/attachment.txt?rev=" + rev);
+ var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc3/attachment.txt");
T(xhr.status == 404);
+ // deleted attachment is still accessible with revision
+ var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc3/attachment.txt?rev=" + rev);
+ T(xhr.status == 200);
+ T(xhr.responseText == bin_data);
+ T(xhr.getResponseHeader("Content-Type") == "text/plain;charset=utf-8");
+
// empty attachments
var xhr = CouchDB.request("PUT", "/test_suite_db/bin_doc4/attachment.txt", {
headers:{"Content-Type":"text/plain;charset=utf-8"},