mirror of
https://github.com/nmap/nmap.git
synced 2026-01-26 16:19:03 +00:00
Fix a bug in the fix. ebf083cb0b (commitcomment-31471930)
This commit is contained in:
@@ -161,12 +161,10 @@ local function get_host_field(host, port, scheme)
|
||||
if host_header then return host_header end
|
||||
-- If there's no host, we can't invent a name.
|
||||
if not host then return nil end
|
||||
local number
|
||||
if type(port) == "number" then
|
||||
number = port
|
||||
port = {number=number, protocol="tcp"}
|
||||
port = {number=port, protocol="tcp"}
|
||||
end
|
||||
stdnse.debug1("get_host_field: host=%s, port=%s, number=%s", host, port, number)
|
||||
local number = port.number
|
||||
if scheme then
|
||||
-- Caller provided scheme. If it's default, return just the hostname.
|
||||
if number == get_default_port(scheme) then
|
||||
|
||||
Reference in New Issue
Block a user