diff options
| author | ruki <[email protected]> | 2023-05-04 12:48:56 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-04 12:48:56 +0800 |
| commit | 67ac27c751ea9b7c706bdd221a78a216f74e2109 (patch) | |
| tree | 3df08de93f68be7fdd208b8a4c6bd5bc816547eb | |
| parent | b95ee9d1c92e2117d9c7b1b96b15df1b473abcbf (diff) | |
| parent | 2f80f81f478ce16a94bfcc700fcee47217e927c5 (diff) | |
Merge pull request #3706 from xqyjlj/fix-_parse_host-dev
🐞 fix(xmake/modules/net/fasturl.lua): fix _parse_host when it has a port
| -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 |
