diff options
| -rw-r--r-- | xmake/modules/net/fasturl.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/net/fasturl.lua b/xmake/modules/net/fasturl.lua index 1849d4784..aacb81378 100644 --- a/xmake/modules/net/fasturl.lua +++ b/xmake/modules/net/fasturl.lua @@ -21,10 +21,10 @@ -- imports import("ping") --- http[s]://xxx.com/.. or [email protected]:xxx/xxx.git +-- http[s]://xxx.com[:1234]/.. or [email protected]:xxx/xxx.git function _parse_host(url) _g._URLHOSTS = _g._URLHOSTS or {} - local host = _g._URLHOSTS[url] or url:match("://(.-)/") or url:match("@(.-):") + local host = _g._URLHOSTS[url] or url:match("://([^/:]+)") or url:match("@(.-):") _g._URLHOSTS[url] = host return host end |
