From ea446bdb442c10610dee3e19aa343475fd603b9f Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Wed, 5 Jan 2011 06:26:49 +0500 Subject: [PATCH] net.httpserver: Changed an unnecessary global access. --- net/httpserver.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/httpserver.lua b/net/httpserver.lua index 4be62ced..6fd9b65e 100644 --- a/net/httpserver.lua +++ b/net/httpserver.lua @@ -20,7 +20,7 @@ local t_insert, t_concat = table.insert, table.concat; local s_match, s_gmatch = string.match, string.gmatch; local tonumber, tostring, pairs, ipairs, type = tonumber, tostring, pairs, ipairs, type; -local urlencode = function (s) return s and (s:gsub("%W", function (c) return string.format("%%%02x", c:byte()); end)); end +local urlencode = function (s) return s and (s:gsub("%W", function (c) return ("%%%02x"):format(c:byte()); end)); end local log = require "util.logger".init("httpserver"); -- 2.30.2