summaryrefslogtreecommitdiffstats
path: root/server.lua
diff options
context:
space:
mode:
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