Software /
code /
prosody
Comparison
net/httpserver.lua @ 3757:e8be634e217a
net.httpserver: Default 'ports' = {5280}
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 17 Dec 2010 01:24:59 +0000 |
parent | 3540:bc139431830b |
child | 4003:b840c4c77b92 |
comparison
equal
deleted
inserted
replaced
3756:db7183f07114 | 3757:e8be634e217a |
---|---|
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; |