summaryrefslogtreecommitdiffstats
path: root/server.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server.lua')
-rw-r--r--server.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/server.lua b/server.lua
index ea5d12c..2566efa 100644
--- a/server.lua
+++ b/server.lua
@@ -39,6 +39,10 @@ return function(env)
)
end
+ if path == '/' and method == 'GET' then
+ return wrap(301, {['Location']='/browser/'})
+ end
+
local data
local length = env.CONTENT_LENGTH and tonumber(
env.CONTENT_LENGTH
@@ -209,10 +213,6 @@ return function(env)
end
if path == '/' then
- if method == 'GET' then
- return 301, {['Location']='/browser/'}
- end
-
if ({DELETE=true, PUT=true})[method] then
if not txn_id then return 405 end
if method == 'PUT' then parent_txn:commit() end