Software /
code /
prosody
Comparison
util/prosodyctl/check.lua @ 12218:0795e1ccf3d8
util.prosodyctl.check: Fix use of LuaSocket URL parser
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 27 Jan 2022 12:52:01 +0100 |
parent | 12217:39043233de04 |
child | 12230:f590058d8d99 |
comparison
equal
deleted
inserted
replaced
12217:39043233de04 | 12218:0795e1ccf3d8 |
---|---|
623 | 623 |
624 local http_host = configmanager.get(host, "http_host") or host; | 624 local http_host = configmanager.get(host, "http_host") or host; |
625 local http_internal_host = http_host; | 625 local http_internal_host = http_host; |
626 local http_url = configmanager.get(host, "http_external_url"); | 626 local http_url = configmanager.get(host, "http_external_url"); |
627 if http_url then | 627 if http_url then |
628 local url_parse = require "socket.url"; | 628 local url_parse = require "socket.url".parse; |
629 local external_url_parts = url_parse(http_url); | 629 local external_url_parts = url_parse(http_url); |
630 if external_url_parts then | 630 if external_url_parts then |
631 http_host = external_url_parts.host; | 631 http_host = external_url_parts.host; |
632 else | 632 else |
633 print(" The 'http_external_url' setting is not a valid URL"); | 633 print(" The 'http_external_url' setting is not a valid URL"); |