net/httpserver.lua

changeset 3877
632f7038a67a
parent 3540
bc139431830b
equal deleted inserted replaced
3876:ea80b3380976 3877:632f7038a67a
188 function new_from_config(ports, handle_request, default_options) 188 function new_from_config(ports, handle_request, default_options)
189 if type(handle_request) == "string" then -- COMPAT with old plugins 189 if type(handle_request) == "string" then -- COMPAT with old plugins
190 log("warn", "Old syntax of httpserver.new_from_config being used to register %s", handle_request); 190 log("warn", "Old syntax of httpserver.new_from_config being used to register %s", handle_request);
191 handle_request, default_options = default_options, { base = handle_request }; 191 handle_request, default_options = default_options, { base = handle_request };
192 end 192 end
193 ports = ports or {5280};
193 for _, options in ipairs(ports) do 194 for _, options in ipairs(ports) do
194 local port = default_options.port or 5280; 195 local port = default_options.port or 5280;
195 local base = default_options.base; 196 local base = default_options.base;
196 local ssl = default_options.ssl or false; 197 local ssl = default_options.ssl or false;
197 local interface = default_options.interface; 198 local interface = default_options.interface;

mercurial