From b642dc129c4d349a849fb0eb055cde263d9d3eb6 Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 29 Nov 2018 17:42:09 +0000 Subject: [PATCH] Fix a bug in the fix. https://github.com/nmap/nmap/commit/ebf083cb0bfc239a000aea7764cdca42f016affe#commitcomment-31471930 --- nselib/http.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nselib/http.lua b/nselib/http.lua index 8933ee56c..e76a144ee 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -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