summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2009-12-23 00:55:35 +0000
committerJan Lehnardt <jan@apache.org>2009-12-23 00:55:35 +0000
commit6bd4afc34d12f96b3872e6b0bc028ad7f01b579c (patch)
treebb7fef7b034373dbe570755b2f5921861e7fdd83 /share
parentfe98014a2345b504ea4bd876fd102c6738ed6bb5 (diff)
Follow RFC 2616 closer and use "verb" instead of "method"
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@893364 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share')
-rw-r--r--share/server/render.js4
-rw-r--r--share/www/script/test/erlang_views.js2
-rw-r--r--share/www/script/test/list_views.js2
-rw-r--r--share/www/script/test/show_documents.js2
4 files changed, 5 insertions, 5 deletions
diff --git a/share/server/render.js b/share/server/render.js
index e19f31c4..45782d76 100644
--- a/share/server/render.js
+++ b/share/server/render.js
@@ -233,9 +233,9 @@ var Render = (function() {
function runUpdate(fun, ddoc, args) {
try {
- var verb = args[1].verb;
+ var method = args[1].method;
// for analytics logging applications you might want to remove the next line
- if (verb == "GET") throw(["error","method_not_allowed","Update functions do not allow GET"]);
+ if (method == "GET") throw(["error","method_not_allowed","Update functions do not allow GET"]);
var result = fun.apply(ddoc, args);
var doc = result[0];
var resp = result[1];
diff --git a/share/www/script/test/erlang_views.js b/share/www/script/test/erlang_views.js
index 4e1e676e..e9e0363f 100644
--- a/share/www/script/test/erlang_views.js
+++ b/share/www/script/test/erlang_views.js
@@ -57,7 +57,7 @@ couchTests.erlang_views = function(debug) {
'fun(Doc, {Req}) -> ' +
' {Info} = proplists:get_value(<<"info">>, Req, {[]}), ' +
' Purged = proplists:get_value(<<"purge_seq">>, Info, -1), ' +
- ' Verb = proplists:get_value(<<"verb">>, Req, <<"not_get">>), ' +
+ ' Verb = proplists:get_value(<<"method">>, Req, <<"not_get">>), ' +
' R = list_to_binary(io_lib:format("~b - ~s", [Purged, Verb])), ' +
' {[{<<"code">>, 200}, {<<"headers">>, {[]}}, {<<"body">>, R}]} ' +
'end.'
diff --git a/share/www/script/test/list_views.js b/share/www/script/test/list_views.js
index 68dfe71c..54214c2c 100644
--- a/share/www/script/test/list_views.js
+++ b/share/www/script/test/list_views.js
@@ -228,7 +228,7 @@ couchTests.list_views = function(debug) {
TEquals(resp.rows[0], {"id": "0","key": 0,"value": "0"});
TEquals(resp.req.info.db_name, "test_suite_db");
- TEquals(resp.req.verb, "GET");
+ TEquals(resp.req.method, "GET");
TEquals(resp.req.path, [
"test_suite_db",
"_design",
diff --git a/share/www/script/test/show_documents.js b/share/www/script/test/show_documents.js
index 5441e72c..f484e029 100644
--- a/share/www/script/test/show_documents.js
+++ b/share/www/script/test/show_documents.js
@@ -192,7 +192,7 @@ couchTests.show_documents = function(debug) {
var resp = JSON.parse(xhr.responseText);
T(equals(resp.headers["X-Foo"], "bar"));
T(equals(resp.query, {foo:"bar"}));
- T(equals(resp.verb, "GET"));
+ T(equals(resp.method, "GET"));
T(equals(resp.path[5], docid));
T(equals(resp.info.db_name, "test_suite_db"));