Comparison

net/httpserver.lua @ 4005:420e57319f89

net.httpserver: Changed an unnecessary global access.
author Waqas Hussain <waqas20@gmail.com>
date Wed, 05 Jan 2011 06:26:49 +0500
parent 4003:b840c4c77b92
child 4006:32073a0fbcca
comparison
equal deleted inserted replaced
4004:c1b3ecbed6c0 4005:420e57319f89
18 18
19 local t_insert, t_concat = table.insert, table.concat; 19 local t_insert, t_concat = table.insert, table.concat;
20 local s_match, s_gmatch = string.match, string.gmatch; 20 local s_match, s_gmatch = string.match, string.gmatch;
21 local tonumber, tostring, pairs, ipairs, type = tonumber, tostring, pairs, ipairs, type; 21 local tonumber, tostring, pairs, ipairs, type = tonumber, tostring, pairs, ipairs, type;
22 22
23 local urlencode = function (s) return s and (s:gsub("%W", function (c) return string.format("%%%02x", c:byte()); end)); end 23 local urlencode = function (s) return s and (s:gsub("%W", function (c) return ("%%%02x"):format(c:byte()); end)); end
24 24
25 local log = require "util.logger".init("httpserver"); 25 local log = require "util.logger".init("httpserver");
26 26
27 local http_servers = {}; 27 local http_servers = {};
28 28