mirror of
https://github.com/nmap/nmap.git
synced 2026-01-06 22:49:02 +00:00
Allow empty path in url.parse.
I got a redirect of "?p=indisponible" and url.parse returned
{query="p=indisponible"}. Now it returns
{path="", query="p=indisponible"}.
This commit is contained in:
@@ -178,7 +178,7 @@ function parse(url, default)
|
||||
return ""
|
||||
end)
|
||||
-- path is whatever was left
|
||||
if url ~= "" then parsed.path = url end
|
||||
parsed.path = url
|
||||
local authority = parsed.authority
|
||||
if not authority then return parsed end
|
||||
authority = string.gsub(authority,"^([^@]*)@",
|
||||
|
||||
Reference in New Issue
Block a user