summaryrefslogtreecommitdiff
path: root/share/www
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-08-05 18:11:45 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-08-05 18:11:45 +0000
commit39ace2d0fa0d3700566bbc453b6518b0a6ff83c3 (patch)
tree990f11712b5943b084c6a737a0fa45866c8a97c5 /share/www
parent53ce56f423a64da476e754f5962a89d0c8eb02d6 (diff)
proper handling of 406 Not Acceptable errors in list and show functions
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@801345 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r--share/www/script/test/show_documents.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/share/www/script/test/show_documents.js b/share/www/script/test/show_documents.js
index 7181a926..59bcd6d3 100644
--- a/share/www/script/test/show_documents.js
+++ b/share/www/script/test/show_documents.js
@@ -318,13 +318,12 @@ couchTests.show_documents = function(debug) {
// test the provides mime matcher without a match
xhr = CouchDB.request("GET", "/test_suite_db/_design/template/_show/provides/"+docid, {
headers: {
- "Accept": 'text/html,application/atom+xml; q=0.9'
+ "Accept": 'text/monkeys'
}
});
- var ct = xhr.getResponseHeader("Content-Type");
- T(/charset=utf-8/.test(ct))
- T(/text\/html/.test(ct))
- T(xhr.responseText == "Ha ha, you said \"plankton\".");
+ var rs = JSON.parse(xhr.responseText);
+ T(rs.error == "not_acceptable")
+
// should fallback on the first one
xhr = CouchDB.request("GET", "/test_suite_db/_design/template/_show/provides/"+docid, {