diff options
-rw-r--r-- | net/http.lua | 1 | ||||
-rw-r--r-- | net/httpserver.lua | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/net/http.lua b/net/http.lua index 29da41ea..0910944e 100644 --- a/net/http.lua +++ b/net/http.lua @@ -15,7 +15,6 @@ local tonumber, tostring, pairs, xpcall, select, debug_traceback = local log = require "util.logger".init("http"); local print = function () end -local urlcodes = setmetatable({}, { __index = function (t, k) t[k] = char(tonumber("0x"..k)); return t[k]; end }); local urlencode = function (s) return s and (s:gsub("%W", function (c) return string.format("%%%02x", c:byte()); end)); end module "http" diff --git a/net/httpserver.lua b/net/httpserver.lua index 0ecf84ea..12328b29 100644 --- a/net/httpserver.lua +++ b/net/httpserver.lua @@ -8,10 +8,9 @@ local connlisteners_get = require "net.connlisteners".get; local listener; local t_insert, t_concat = table.insert, table.concat; -local s_match, s_gmatch, s_char = string.match, string.gmatch; +local s_match, s_gmatch = string.match, string.gmatch; local tonumber, tostring, pairs = tonumber, tostring, pairs; -local urlcodes = setmetatable({}, { __index = function (t, k) t[k] = s_char(tonumber("0x"..k)); return t[k]; end }); local urlencode = function (s) return s and (s:gsub("%W", function (c) return string.format("%%%x", c:byte()); end)); end local log = require "util.logger".init("httpserver"); |