Think I got the patch put together to fix the 1.7 thing and command
line test runner.
I should learn to use git's bisect in the future.
Paul
Index: test/runner.sh
===================================================================
--- test/runner.sh (revision 730307)
+++ test/runner.sh (working copy)
@@ -4,4 +4,4 @@
erl -noshell -pa ../src/couchdb -pa ../src/mochiweb -eval "runner:run()"
-cat ../share/www/script/couch.js ../share/www/script/couch_tests.js test.js | ../src/couchdb/couchjs -
+cat ../share/www/script/couch.js ../share/www/script/couch_test_runner.js ../share/www/script/couch_tests.js test.js | ../src/couchdb/couchjs -
Index: test/test.js
===================================================================
--- test/test.js (revision 730307)
+++ test/test.js (working copy)
@@ -67,8 +67,7 @@
var h = headers[i];
if (keymatcher.test(h)) {
var value = h.substr(key.length+2);
- value = value.slice(0, value.length-1);
- return value;
+ return value.replace(/^\s+|\s+$/g,"");
}
}
return "";
Index: share/www/script/couch_tests.js
===================================================================
--- share/www/script/couch_tests.js (revision 730307)
+++ share/www/script/couch_tests.js (working copy)
@@ -2116,7 +2116,7 @@
body: "foofoo"
};
},
- default : "html"
+ fallback : "html"
});
}).toString()
}
Index: share/server/main.js
===================================================================
--- share/server/main.js (revision 730307)
+++ share/server/main.js (working copy)
@@ -133,7 +133,6 @@
return publicMethods;
})();
-
// this function provides a shortcut for managing responses by Accept header
respondWith = function(req, responders) {
var accept = req.headers["Accept"];
@@ -153,10 +152,10 @@
resp["headers"]["Content-Type"] = bestMime;
return resp;
}
+ }
+ if (responders.fallback) {
+ return responders[responders.fallback]();
}
- if (responders.default) {
- return responders[responders.default]();
- }
throw({code:406, body:"Not Acceptable: "+accept});
}