From 4117259212afab1c15f98eaeffb8c442cfa54c8c Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 12 Jul 2009 15:22:37 +0100 Subject: mod_httpserver: Use new httpserver helper to initialise ports --- plugins/mod_httpserver.lua | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_httpserver.lua b/plugins/mod_httpserver.lua index 98a3a36e..0f1d991c 100644 --- a/plugins/mod_httpserver.lua +++ b/plugins/mod_httpserver.lua @@ -28,14 +28,4 @@ local function handle_request(method, body, request) end local ports = config.get(module.host, "core", "http_ports") or { 5280 }; -for _, options in ipairs(ports) do - local port, base, ssl, interface = 5280, "files", false, nil; - if type(options) == "number" then - port = options; - elseif type(options) == "table" then - port, base, ssl, interface = options.port or 5280, options.path or "files", options.ssl or false, options.interface; - elseif type(options) == "string" then - base = options; - end - httpserver.new{ port = port, base = base, handler = handle_request, ssl = ssl } -end +httpserver.new_from_config(ports, handle_request); -- cgit v1.2.3