From 46874e0e90a46fefe0a6f7e1ef574bb6a2fcaf78 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Mon, 29 Dec 2008 20:14:37 +0000 Subject: add etags to standalone attachment requests. Closes COUCHDB-184 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@729992 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/couch_tests.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'share') diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js index 8a00dc93..1eb1836e 100644 --- a/share/www/script/couch_tests.js +++ b/share/www/script/couch_tests.js @@ -795,11 +795,13 @@ var tests = { } } - T(db.save(binAttDoc).ok); + var save_response = db.save(binAttDoc); + T(save_response.ok); var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc/foo.txt"); T(xhr.responseText == "This is a base64 encoded text"); T(xhr.getResponseHeader("Content-Type") == "text/plain"); + T(xhr.getResponseHeader("Etag") == save_response.rev); // empty attachment var binAttDoc2 = { -- cgit v1.2.3