summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--src/couchdb/couch_httpd_external.erl4
-rw-r--r--test/view_server/query_server_spec.rb2
6 files changed, 8 insertions, 8 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"));
diff --git a/src/couchdb/couch_httpd_external.erl b/src/couchdb/couch_httpd_external.erl
index 13aff847..efbe87b8 100644
--- a/src/couchdb/couch_httpd_external.erl
+++ b/src/couchdb/couch_httpd_external.erl
@@ -55,7 +55,7 @@ process_external_req(HttpReq, Db, Name) ->
end.
json_req_obj(Req, Db) -> json_req_obj(Req, Db, null).
json_req_obj(#httpd{mochi_req=Req,
- method=Verb,
+ method=Method,
path_parts=Path,
req_body=ReqBody
}, Db, DocId) ->
@@ -75,7 +75,7 @@ json_req_obj(#httpd{mochi_req=Req,
% add headers...
{[{<<"info">>, {Info}},
{<<"id">>, DocId},
- {<<"verb">>, Verb},
+ {<<"method">>, Method},
{<<"path">>, Path},
{<<"query">>, to_json_terms(Req:parse_qs())},
{<<"headers">>, to_json_terms(Hlist)},
diff --git a/test/view_server/query_server_spec.rb b/test/view_server/query_server_spec.rb
index 3d933fdc..1de8e5bc 100644
--- a/test/view_server/query_server_spec.rb
+++ b/test/view_server/query_server_spec.rb
@@ -642,7 +642,7 @@ describe "query server normal case" do
it "should return a doc and a resp body" do
up, doc, resp = @qs.ddoc_run(@ddoc,
["updates","basic"],
- [{"foo" => "gnarly"}, {"verb" => "POST"}]
+ [{"foo" => "gnarly"}, {"method" => "POST"}]
)
up.should == "up"
doc.should == {"foo" => "gnarly", "world" => "hello"}