From 9ebb79a24eecc2004a211b2475ffb7b34f31d138 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Tue, 20 Jul 2010 01:04:22 +0000 Subject: require application/json content-type in the remaining places where a POST has side-effects git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@965702 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/view_errors.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'share/www/script/test') diff --git a/share/www/script/test/view_errors.js b/share/www/script/test/view_errors.js index c6607ad4..a211c061 100644 --- a/share/www/script/test/view_errors.js +++ b/share/www/script/test/view_errors.js @@ -56,14 +56,14 @@ couchTests.view_errors = function(debug) { }); T(JSON.parse(xhr.responseText).error == "bad_request"); - // views should ignore Content-Type, like the rest of CouchDB + // content type must be json var xhr = CouchDB.request("POST", "/test_suite_db/_temp_view", { headers: {"Content-Type": "application/x-www-form-urlencoded"}, body: JSON.stringify({language: "javascript", map : "function(doc){}" }) }); - T(xhr.status == 200); + T(xhr.status == 415); var map = function (doc) {emit(doc.integer, doc.integer);}; -- cgit v1.2.3