Changeset

1538:dff620405503

mod_httpserver: Use new httpserver helper to initialise ports
author Matthew Wild <mwild1@gmail.com>
date Sun, 12 Jul 2009 15:22:37 +0100 (2009-07-12)
parents 1537:6670af04aeb6
children 1539:30ebb38573b7 1540:19fb86c19a59
files plugins/mod_httpserver.lua
diffstat 1 files changed, 1 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_httpserver.lua	Sun Jul 12 15:21:10 2009 +0100
+++ b/plugins/mod_httpserver.lua	Sun Jul 12 15:22:37 2009 +0100
@@ -28,14 +28,4 @@
 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);