From 3a9b4d93afffd179d4df2f8058fdc7fd5007110a Mon Sep 17 00:00:00 2001 From: nnposter Date: Sat, 1 Apr 2017 22:05:36 +0000 Subject: [PATCH] Allows the port to be a simple number --- nselib/http.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/nselib/http.lua b/nselib/http.lua index 1343ce3f3..90e793cca 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -161,6 +161,7 @@ end -- See RFC 2616 sections 14.23 and 5.2. local function get_host_field(host, port) if not host then return nil end + port = type(port) == "number" and {number=port} or port local ssl = shortport.ssl(host, port) local pn = port.number if not ssl and pn == 80 or ssl and pn == 443 then