mirror of
https://github.com/nmap/nmap.git
synced 2026-02-01 19:19:09 +00:00
Lower-case scheme comparisons.
I'm seeing redirects to "HTTP://example.com/".
This commit is contained in:
@@ -1414,8 +1414,8 @@ local function parse_redirect(host, port, path, response)
|
||||
end
|
||||
-- do port fixup
|
||||
if ( not(u.port) ) then
|
||||
if ( u.scheme == "http" ) then u.port = 80
|
||||
elseif ( u.scheme == "https") then u.port = 443
|
||||
if ( string.lower(u.scheme) == "http" ) then u.port = 80
|
||||
elseif ( string.lower(u.scheme) == "https") then u.port = 443
|
||||
else u.port = port.number end
|
||||
end
|
||||
if ( not(u.path) ) then
|
||||
|
||||
Reference in New Issue
Block a user