couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r893364 - in /couchdb/trunk: share/server/render.js share/www/script/test/erlang_views.js share/www/script/test/list_views.js share/www/script/test/show_documents.js src/couchdb/couch_httpd_external.erl test/view_server/query_server_spec.rb
Date Wed, 23 Dec 2009 00:55:35 GMT
Author: jan
Date: Wed Dec 23 00:55:35 2009
New Revision: 893364

URL: http://svn.apache.org/viewvc?rev=893364&view=rev
Log:
Follow RFC 2616 closer and use "verb" instead of "method"

Modified:
    couchdb/trunk/share/server/render.js
    couchdb/trunk/share/www/script/test/erlang_views.js
    couchdb/trunk/share/www/script/test/list_views.js
    couchdb/trunk/share/www/script/test/show_documents.js
    couchdb/trunk/src/couchdb/couch_httpd_external.erl
    couchdb/trunk/test/view_server/query_server_spec.rb

Modified: couchdb/trunk/share/server/render.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/server/render.js?rev=893364&r1=893363&r2=893364&view=diff
==============================================================================
--- couchdb/trunk/share/server/render.js (original)
+++ couchdb/trunk/share/server/render.js Wed Dec 23 00:55:35 2009
@@ -233,9 +233,9 @@
 
   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];

Modified: couchdb/trunk/share/www/script/test/erlang_views.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/erlang_views.js?rev=893364&r1=893363&r2=893364&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/erlang_views.js (original)
+++ couchdb/trunk/share/www/script/test/erlang_views.js Wed Dec 23 00:55:35 2009
@@ -57,7 +57,7 @@
             '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.'

Modified: couchdb/trunk/share/www/script/test/list_views.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/list_views.js?rev=893364&r1=893363&r2=893364&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/list_views.js (original)
+++ couchdb/trunk/share/www/script/test/list_views.js Wed Dec 23 00:55:35 2009
@@ -228,7 +228,7 @@
   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",

Modified: couchdb/trunk/share/www/script/test/show_documents.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/show_documents.js?rev=893364&r1=893363&r2=893364&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/show_documents.js (original)
+++ couchdb/trunk/share/www/script/test/show_documents.js Wed Dec 23 00:55:35 2009
@@ -192,7 +192,7 @@
   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"));
 

Modified: couchdb/trunk/src/couchdb/couch_httpd_external.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_external.erl?rev=893364&r1=893363&r2=893364&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd_external.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd_external.erl Wed Dec 23 00:55:35 2009
@@ -55,7 +55,7 @@
     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 @@
     % add headers...
     {[{<<"info">>, {Info}},
         {<<"id">>, DocId},
-        {<<"verb">>, Verb},
+        {<<"method">>, Method},
         {<<"path">>, Path},
         {<<"query">>, to_json_terms(Req:parse_qs())},
         {<<"headers">>, to_json_terms(Hlist)},

Modified: couchdb/trunk/test/view_server/query_server_spec.rb
URL: http://svn.apache.org/viewvc/couchdb/trunk/test/view_server/query_server_spec.rb?rev=893364&r1=893363&r2=893364&view=diff
==============================================================================
--- couchdb/trunk/test/view_server/query_server_spec.rb (original)
+++ couchdb/trunk/test/view_server/query_server_spec.rb Wed Dec 23 00:55:35 2009
@@ -642,7 +642,7 @@
     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"}



Mime
View raw message