net.httpserver: Removed unused import and variables.
[prosody.git] / net / httpserver.lua
index 4be62ced61ab64110ebb374fe87e4a1d053a862f..d401f47c6552e8c7f4855eea084433ee31f0b4bb 100644 (file)
@@ -7,7 +7,6 @@
 --
 
 
-local socket = require "socket"
 local server = require "net.server"
 local url_parse = require "socket.url".parse;
 local httpstream_new = require "util.httpstream".new;
@@ -17,10 +16,9 @@ local connlisteners_get = require "net.connlisteners".get;
 local listener;
 
 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");