summaryrefslogtreecommitdiffstats
path: root/server.lua
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2013-09-16 10:56:21 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2013-09-16 11:00:38 +0300
commitc8d12ce26e1847745077a187cccabf417f118732 (patch)
treee157155ca36b93e29e18025e1202ba2751765a24 /server.lua
parent39585e03087158d37af2166aa47d06307c668d68 (diff)
downloadaconf-c8d12ce26e1847745077a187cccabf417f118732.tar.bz2
aconf-c8d12ce26e1847745077a187cccabf417f118732.tar.xz
protocol: change URL for transaction operations to /transaction
Diffstat (limited to 'server.lua')
-rw-r--r--server.lua5
1 files changed, 3 insertions, 2 deletions
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