From 4c1cc6f54edc35a4aa2f1553bc9ce372a2b77695 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Fri, 28 Jun 2013 23:50:18 +0300 Subject: eliminate explicit use of string module --- server.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server.lua') 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 -- cgit v1.2.3