mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-25 03:58:21 +01:00
fix(url): Avoid query string being part of authority, allows parsing empty paths
This commit is contained in:
parent
bef62aeb50
commit
7eaf648056
@ -152,7 +152,7 @@ function _M.parse(url, default)
|
||||
url = string.gsub(url, "^([%w][%w%+%-%.]*)%:",
|
||||
function(s) parsed.scheme = s; return "" end)
|
||||
-- get authority
|
||||
url = string.gsub(url, "^//([^/]*)", function(n)
|
||||
url = string.gsub(url, "^//([^/%?]*)", function(n)
|
||||
parsed.authority = n
|
||||
return ""
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user