mirror of
https://github.com/nmap/nmap.git
synced 2025-12-24 08:29:04 +00:00
Don't treat an empty string as an invalid URL.
To me, this is a relative URL with a path of "". I.e., it refers to the same document as wherever the URL appeared, like when people do <form action="" enctype="multipart/form-data" method="POST">
This commit is contained in:
@@ -152,8 +152,6 @@ function parse(url, default)
|
||||
-- initialize default parameters
|
||||
local parsed = {}
|
||||
for i,v in base.pairs(default or parsed) do parsed[i] = v end
|
||||
-- empty url is parsed to nil
|
||||
if not url or url == "" then return nil, "invalid url" end
|
||||
-- remove whitespace
|
||||
-- url = string.gsub(url, "%s", "")
|
||||
-- get fragment
|
||||
|
||||
Reference in New Issue
Block a user