summaryrefslogtreecommitdiffstats
path: root/server.lua
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2013-06-28 23:50:18 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2013-09-04 15:24:08 +0300
commit4c1cc6f54edc35a4aa2f1553bc9ce372a2b77695 (patch)
treed4142961891040a433add8ea3d350be4c6d58471 /server.lua
parent25ffc62a5b2c9a65e5c1689d5351adcf8cbef7e2 (diff)
downloadaconf-4c1cc6f54edc35a4aa2f1553bc9ce372a2b77695.tar.bz2
aconf-4c1cc6f54edc35a4aa2f1553bc9ce372a2b77695.tar.xz
eliminate explicit use of string module
Diffstat (limited to 'server.lua')
-rw-r--r--server.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/server.lua b/server.lua
index 727b339..457e238 100644
--- a/server.lua
+++ b/server.lua
@@ -118,11 +118,11 @@ return function(env)
function()
if stringy.startswith(path, '/meta/') then
if method ~= 'GET' then return 405 end
- return 200, nil, txn:meta(string.sub(path, 6, -1))
+ return 200, nil, txn:meta(path:sub(6, -1))
end
if stringy.startswith(path, '/config/') then
- path = string.sub(path, 8, -1)
+ path = path:sub(8, -1)
local parent, name, res
if path ~= '/' then