Mercurial > prosody-hg
comparison net/httpserver.lua @ 3877:632f7038a67a
net.httpserver: Default 'ports' = {5280}
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 17 Dec 2010 01:24:59 +0000 |
| parents | bc139431830b |
| children | b840c4c77b92 |
comparison
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; |
