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

Corrects handling of empty pipelines, expressed as nil. Fixes #538

This commit is contained in:
nnposter
2016-09-12 16:14:33 +00:00
parent 6e75d69ee5
commit 88f6ddc596

View File

@@ -1811,7 +1811,6 @@ end
-- @return A list of responses, in the same order as the requests were queued.
-- Each response is a table as described in the module documentation.
function pipeline_go(host, port, all_requests)
stdnse.debug1("Total number of pipelined requests: " .. #all_requests)
local responses
local response
local partial
@@ -1819,10 +1818,11 @@ function pipeline_go(host, port, all_requests)
responses = {}
-- Check for an empty request
if (#all_requests == 0) then
if (not all_requests or #all_requests == 0) then
stdnse.debug1("Warning: empty set of requests passed to http.pipeline_go()")
return responses
end
stdnse.debug1("Total number of pipelined requests: " .. #all_requests)
local socket, bopt