Software /
code /
prosody
Comparison
plugins/mod_http.lua @ 5191:9ab06d0dbf68
Merge 0.9->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 22 Nov 2012 20:42:12 +0100 |
parent | 5190:76c73bd3d483 |
child | 5204:0b4f680ea116 |
comparison
equal
deleted
inserted
replaced
5189:7f6cc8ed2247 | 5191:9ab06d0dbf68 |
---|---|
53 local http_services = services:get("https") or services:get("http") or {}; | 53 local http_services = services:get("https") or services:get("http") or {}; |
54 for interface, ports in pairs(http_services) do | 54 for interface, ports in pairs(http_services) do |
55 for port, services in pairs(ports) do | 55 for port, services in pairs(ports) do |
56 local url = { | 56 local url = { |
57 scheme = (external_url.scheme or services[1].service.name); | 57 scheme = (external_url.scheme or services[1].service.name); |
58 host = (external_url.host or module.host); | 58 host = (external_url.host or module:get_option_string("http_host", module.host)); |
59 port = tonumber(external_url.port) or port or 80; | 59 port = tonumber(external_url.port) or port or 80; |
60 path = normalize_path(external_url.path or "/").. | 60 path = normalize_path(external_url.path or "/").. |
61 (get_base_path(module, app_name, default_path or "/"..app_name):sub(2)); | 61 (get_base_path(module, app_name, default_path or "/"..app_name):sub(2)); |
62 } | 62 } |
63 if ports_by_scheme[url.scheme] == url.port then url.port = nil end | 63 if ports_by_scheme[url.scheme] == url.port then url.port = nil end |