1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Header Connection is a comma-separated list

This commit is contained in:
nnposter
2019-04-21 18:42:50 +00:00
parent 3de7a0177b
commit 976668b564

View File

@@ -871,7 +871,7 @@ local function getPipelineMax(response)
if response then if response then
local hdr = response.header or {} local hdr = response.header or {}
local opts = stringaux.strsplit("%s+", (hdr.connection or ""):lower()) local opts = stringaux.strsplit("[,%s]+", (hdr.connection or ""):lower())
if tableaux.contains(opts, "close") then return 1 end if tableaux.contains(opts, "close") then return 1 end
if response.version >= "1.1" or tableaux.contains(opts, "keep-alive") then if response.version >= "1.1" or tableaux.contains(opts, "keep-alive") then
return tonumber((hdr["keep-alive"] or ""):match("max=(%d+)")) or 40 return tonumber((hdr["keep-alive"] or ""):match("max=(%d+)")) or 40