From c8d12ce26e1847745077a187cccabf417f118732 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Mon, 16 Sep 2013 10:56:21 +0300 Subject: protocol: change URL for transaction operations to /transaction --- server.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server.lua') diff --git a/server.lua b/server.lua index 457e238..7168c0e 100644 --- a/server.lua +++ b/server.lua @@ -39,7 +39,8 @@ return function(env) ) end - if path == '/' and method == 'GET' then + if path == '/' then + if method ~= 'GET' then return wrap(405) end return wrap(301, {['Location']='/browser/'}) end @@ -219,7 +220,7 @@ return function(env) return res == nil and 205 or 200, nil, res end - if path == '/' then + if path == '/transaction' then if ({DELETE=true, PUT=true})[method] then if not txn_id then return 405 end if method == 'PUT' then parent_txn:commit() end -- cgit v1.2.3