summaryrefslogtreecommitdiff
path: root/share/server
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-01-02 02:00:33 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-01-02 02:00:33 +0000
commit2886280c57cb77b6e7f2bac544af5b8c23164816 (patch)
treeff59fdfe707f45a9888a3a0c53560211cbbbacd2 /share/server
parenta0da70849a2ede47340e75c62b92ddfe7b89829e (diff)
test runner is back up (thanks davisp), and tests pass in safari again (e4x syntax fix)
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@730656 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/server')
-rw-r--r--share/server/main.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/share/server/main.js b/share/server/main.js
index 58acae90..dfb0a403 100644
--- a/share/server/main.js
+++ b/share/server/main.js
@@ -133,7 +133,6 @@ var Mimeparse = (function() {
return publicMethods;
})();
-
// this function provides a shortcut for managing responses by Accept header
respondWith = function(req, responders) {
var accept = req.headers["Accept"];
@@ -153,9 +152,9 @@ respondWith = function(req, responders) {
resp["headers"]["Content-Type"] = bestMime;
return resp;
}
- }
- if (responders.default) {
- return responders[responders.default]();
+ }
+ if (responders.fallback) {
+ return responders[responders.fallback]();
}
throw({code:406, body:"Not Acceptable: "+accept});
}